“EMA_5.5” besteht aus je 5 MZP im Pre- und im Post-Intervall. Dies sind die ursprünglich simulierten EMA-Daten von N = 100 Personen (ursprünglich N = 100.000).
“EMA_30.30” besteht aus je 30 MZP im Pre- und im Post-Intervall. Diese wurden aus den ursprünglichen Simulationsdaten erweitert und umfassen dieselben N = 100 Personen.
“EMA_5.5_Window” besteht aus je 5 MZP im Pre- und im Post-Intervall, wobei diese (pro Person) jeweils als zusammenhängendes Intervall (Window) zufällig aus den Gesamt-Intervallen ausgewählt wurden. Die Stichprobe umfasst dieselben N = 100 Personen.
“EMA_5.5_Days” besteht aus je 5 MZP im Pre- und im Post-Intervall, wobei diese pro Person jeweils unzusammenhängend zufällig aus den Gesamt-Intervallen ausgewählt wurden. Die Stichprobe umfasst dieselben N = 100 Personen.
# Ausschluss von Personen ohne Varianz in min. einem MZP-Intervall
# sd(c(1,1,1,1,2)) = 0.4472136 = min. SD bei 5 (nicht gleichen) MZP
# sd(c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2)) = 0.1825742 = min. SD bei 30 (nicht gleichen) MZP
EMA_5.5 = EMA_5.5 %>%
filter(ind.pretestSD != 0 & ind.posttestSD != 0)
EMA_30.30 = EMA_30.30 %>%
filter(ind.pretestSD != 0 & ind.posttestSD != 0)
EMA_5.5 = EMA_5.5 %>%
filter(ID_orig %in% EMA_30.30$ID1_PRE)
EMA_30.30 = EMA_30.30 %>%
filter(ID1_PRE %in% EMA_5.5$ID_orig)
EMA_5.5 = EMA_5.5 %>%
add_column(., .before = "ID_orig", ID = 1:nrow(.))
EMA_30.30 = EMA_30.30 %>%
add_column(., .before = "ID1_PRE", ID = 1:nrow(.))load("cor_04_k20/EMA_5.5_Window.RData")
load("cor_04_k20/EMA_5.5_Days.RData")
EMA_5.5_Window$PRE_Mean = apply(EMA_5.5_Window[pre_5mzp], 1, mean)
EMA_5.5_Window$POST_Mean = apply(EMA_5.5_Window[post_5mzp], 1, mean)
EMA_5.5_Window$MeanDiff = EMA_5.5_Window$PRE_Mean - EMA_5.5_Window$POST_Mean
EMA_5.5_Window$ind.pretestSD = apply(EMA_5.5_Window[pre_5mzp], 1, sd)
EMA_5.5_Window$ind.posttestSD = apply(EMA_5.5_Window[post_5mzp], 1, sd)
EMA_5.5_Days$PRE_Mean = apply(EMA_5.5_Days[pre_5mzp], 1, mean)
EMA_5.5_Days$POST_Mean = apply(EMA_5.5_Days[post_5mzp], 1, mean)
EMA_5.5_Days$MeanDiff = EMA_5.5_Days$PRE_Mean - EMA_5.5_Days$POST_Mean
EMA_5.5_Days$ind.pretestSD = apply(EMA_5.5_Days[pre_5mzp], 1, sd)
EMA_5.5_Days$ind.posttestSD = apply(EMA_5.5_Days[post_5mzp], 1, sd)# Ausschluss von Personen ohne Varianz in min. einem MZP-Intervall
EMA_5.5_Window = EMA_5.5_Window %>%
filter(ind.pretestSD != 0 & ind.posttestSD != 0)
EMA_5.5_Days = EMA_5.5_Days %>%
filter(ind.pretestSD != 0 & ind.posttestSD != 0)
EMA_5.5 = EMA_5.5 %>%
filter(ID %in% EMA_30.30$ID & ID %in% EMA_5.5_Window$ID & ID %in% EMA_5.5_Days$ID)
EMA_30.30 = EMA_30.30 %>%
filter(ID %in% EMA_5.5$ID & ID %in% EMA_5.5_Window$ID & ID %in% EMA_5.5_Days$ID)
EMA_5.5_Window = EMA_5.5_Window %>%
filter(ID %in% EMA_5.5$ID & ID %in% EMA_30.30$ID & ID %in% EMA_5.5_Days$ID)
EMA_5.5_Days = EMA_5.5_Days %>%
filter(ID %in% EMA_5.5$ID & ID %in% EMA_30.30$ID & ID %in% EMA_5.5_Window$ID)
EMA_5.5$ID = 1:nrow(EMA_5.5)
EMA_30.30$ID = 1:nrow(EMA_30.30)
EMA_5.5_Window$ID = 1:nrow(EMA_5.5_Window)
EMA_5.5_Days$ID = 1:nrow(EMA_5.5_Days)# or with slice_sample(n = 100)
rand = sample(EMA_5.5$ID, size = 100)
EMA_5.5 = EMA_5.5 %>%
filter(ID %in% rand)
EMA_30.30 = EMA_30.30 %>%
filter(ID %in% rand)
EMA_5.5_Window = EMA_5.5_Window %>%
filter(ID %in% rand)
EMA_5.5_Days = EMA_5.5_Days %>%
filter(ID %in% rand)Beispiel-Verläufe in den 4 untersuchten Datensets
EMA_5.5 %>%
within(., {ind.pretestSD = round(ind.pretestSD, digits = 2)
ind.posttestSD = round(ind.posttestSD, digits = 2)}) %>%
head() %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE) %>%
scroll_box(width = "100%")| ID | ID_orig | PRE1_1 | PRE1_2 | PRE1_3 | PRE1_4 | PRE1_5 | POST1_1 | POST1_2 | POST1_3 | POST1_4 | POST1_5 | PRE_Mean | POST_Mean | MeanDiff | ind.pretestSD | ind.posttestSD |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 16 | 17 | 13 | 9 | 13 | 11 | 9 | 10 | 5 | 9 | 9 | 13 | 11.0 | 9.2 | 1.8 | 2.00 | 2.86 |
| 33 | 37 | 8 | 8 | 7 | 0 | 12 | 4 | 1 | 5 | 6 | 8 | 7.0 | 4.8 | 2.2 | 4.36 | 2.59 |
| 82 | 91 | 12 | 10 | 13 | 9 | 10 | 10 | 5 | 3 | 5 | 8 | 10.8 | 6.2 | 4.6 | 1.64 | 2.77 |
| 103 | 118 | 14 | 11 | 11 | 11 | 10 | 15 | 7 | 7 | 9 | 6 | 11.4 | 8.8 | 2.6 | 1.52 | 3.63 |
| 259 | 299 | 6 | 6 | 6 | 7 | 11 | 15 | 12 | 5 | 9 | 9 | 7.2 | 10.0 | -2.8 | 2.17 | 3.74 |
| 299 | 342 | 18 | 14 | 13 | 7 | 9 | 16 | 13 | 10 | 4 | 7 | 12.2 | 10.0 | 2.2 | 4.32 | 4.74 |
Pre-Post-Verläufe für 9 zufällig gezogene Personen
rand = sample(EMA_5.5$ID, 9)
x = tibble(ID = c(rep(rand[1],times=11),
rep(rand[2],times=11),
rep(rand[3],times=11),
rep(rand[4],times=11),
rep(rand[5],times=11),
rep(rand[6],times=11),
rep(rand[7],times=11),
rep(rand[8],times=11),
rep(rand[9],times=11)),
MZP = rep(seq(as.Date("2020-01-01"), length.out=11, by="1 day"), times=9),
Score = c(as.numeric(EMA_5.5[rand[1],pre_5mzp]), NA, as.numeric(EMA_5.5[rand[1],post_5mzp]),
as.numeric(EMA_5.5[rand[2],pre_5mzp]), NA, as.numeric(EMA_5.5[rand[2],post_5mzp]),
as.numeric(EMA_5.5[rand[3],pre_5mzp]), NA, as.numeric(EMA_5.5[rand[3],post_5mzp]),
as.numeric(EMA_5.5[rand[4],pre_5mzp]), NA, as.numeric(EMA_5.5[rand[4],post_5mzp]),
as.numeric(EMA_5.5[rand[5],pre_5mzp]), NA, as.numeric(EMA_5.5[rand[5],post_5mzp]),
as.numeric(EMA_5.5[rand[6],pre_5mzp]), NA, as.numeric(EMA_5.5[rand[6],post_5mzp]),
as.numeric(EMA_5.5[rand[7],pre_5mzp]), NA, as.numeric(EMA_5.5[rand[7],post_5mzp]),
as.numeric(EMA_5.5[rand[8],pre_5mzp]), NA, as.numeric(EMA_5.5[rand[8],post_5mzp]),
as.numeric(EMA_5.5[rand[9],pre_5mzp]), NA, as.numeric(EMA_5.5[rand[9],post_5mzp])))
x %>%
group_by(ID) %>%
plot_time_series(MZP, Score,
#.color_var = ID, # for multiple lines in one plot
#.color_lab = "ID",
.facet_ncol = 3,
.facet_scales = "fixed",
.interactive = TRUE,
.facet_collapse = FALSE,
.smooth = TRUE,
.smooth_degree = 2,
.smooth_alpha = 0.5,
.smooth_size = 0.2
)# don´t run this section (code for extremely computation-intense plots that I already stored as .RData and .jpg)
# repeated-measures scatter-boxplot-violin-histograms for individual PRE and POST means
# from van Langen (2020) Open-visualizations tutorial for repeated measures in R
# EMA_5.5
# converting my dataframes to use in the same ggplot structure:
EMA_5.5_ts = EMA_5.5 %>%
select(ID, PRE_Mean, POST_Mean) %>%
pivot_longer(!ID, names_to = "Interval", values_to = "Mean") %>%
mutate(ID = as.factor(ID),
Interval = rep(c(1,2), times = nrow(EMA_5.5)))
save(EMA_5.5_ts, file = "Time Series Dataframes/k20_EMA_5.5_n100_ts.RData")
###
load("Time Series Dataframes/k20_EMA_5.5_n100_ts.RData")
# Repeated measures with box− and violin plots
EMA_5.5_ts$jit = jitter(EMA_5.5_ts$Interval, amount = .09)
Pre_Post_Box_Violin = ggplot(data = EMA_5.5_ts, aes(y = Mean)) +
geom_point(data = EMA_5.5_ts %>% filter(Interval == "1"), aes(x = jit), color = "dodgerblue", size = 1,
alpha = .5) +
geom_point(data = EMA_5.5_ts %>% filter(Interval == "2"), aes(x = jit), color = "darkorange", size = 1,
alpha = .5) +
geom_line(aes(x = jit, group = ID), color = "lightgray", alpha = .05) +
geom_half_boxplot(
data = EMA_5.5_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = -.25),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = TRUE, width = .1,
fill = "dodgerblue", alpha = .5) +
geom_half_boxplot(
data = EMA_5.5_ts %>% filter(Interval == "2"), aes(x = Interval, y = Mean), position = position_nudge(x = .15),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = TRUE, width = .1,
fill = "darkorange", alpha = .5) +
geom_half_violin(
data = EMA_5.5_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = 1.3),
side = "r", fill = "dodgerblue", alpha = .5, trim = FALSE) +
geom_half_violin(
data = EMA_5.5_ts %>% filter(Interval == "2"), aes(x = Interval, y = Mean), position = position_nudge(x = .3),
side = "r", fill = "darkorange", alpha = .5, trim = FALSE) +
scale_x_continuous(breaks = c(1,2), labels = c("PRE", "POST"), limits = c(0, 3)) +
xlab("Interval") + ylab("PHQ-9 Mean Score") +
#ggtitle("EMA Data (5+5 Timepoints): Individual Pre-Post Means") +
#theme_classic() +
theme_bw() +
coord_cartesian(ylim = c(0, 24))
ggsave("Time Series Dataframes/k20_EMA_5.5_n100_Pre-Post_Box_Violin.jpg", plot = Pre_Post_Box_Violin, width = 6, height = 4)
save(Pre_Post_Box_Violin, file = "Time Series Dataframes/k20_EMA_5.5_n100_Pre_Post_Box_Violin.RData")
# Repeated measures with box− and violin plots and means + CIs
score_mean_1 = EMA_5.5_ts %>% filter(Interval == "1") %>% summarise(mean(Mean)) %>% as.numeric()
score_mean_2 = EMA_5.5_ts %>% filter(Interval == "2") %>% summarise(mean(Mean)) %>% as.numeric()
score_median1 = EMA_5.5_ts %>% filter(Interval == "1") %>% summarise(median(Mean)) %>% as.numeric()
score_median2 = EMA_5.5_ts %>% filter(Interval == "2") %>% summarise(median(Mean)) %>% as.numeric()
score_sd_1 = EMA_5.5_ts %>% filter(Interval == "1") %>% summarise(sd(Mean)) %>% as.numeric()
score_sd_2 = EMA_5.5_ts %>% filter(Interval == "2") %>% summarise(sd(Mean)) %>% as.numeric()
score_se_1 = score_sd_1/sqrt(nrow(EMA_5.5))
score_se_2 = score_sd_2/sqrt(nrow(EMA_5.5))
score_ci_1 = EMA_5.5_ts %>% filter(Interval == "1") %>% pull(Mean) %>% CI(., ci = 0.95)
score_ci_2 = EMA_5.5_ts %>% filter(Interval == "2") %>% pull(Mean) %>% CI(., ci = 0.95)
#Create data frame with 2 rows and 7 columns containing the descriptives
group = c("PRE", "POST")
N = c(nrow(EMA_5.5), nrow(EMA_5.5))
score_mean = c(score_mean_1, score_mean_2)
score_median = c(score_median1, score_median2)
sd = c(score_sd_1, score_sd_2)
se = c(score_se_1, score_se_2)
ci = c(as.numeric(score_ci_1[1] - score_ci_1[3]), as.numeric(score_ci_2[1] - score_ci_2[3]))
summary_df = data.frame(group, N, score_mean, score_median, sd, se, ci)
# EMA_5.5_ts$jit = jitter(EMA_5.5_ts$Interval, amount = .09) #already created above
x_tick_means = c(.87, 2.13)
Pre_Post_Box_Violin_Mean_CI = ggplot(data = EMA_5.5_ts, aes(y = Mean)) +
geom_point(data = EMA_5.5_ts %>% filter(Interval == "1"), aes(x = jit), color = "dodgerblue", size = 1,
alpha = .6) +
geom_point(data = EMA_5.5_ts %>% filter(Interval == "2"), aes(x = jit), color = "darkorange", size = 1,
alpha = .6) +
geom_line(aes(x = jit, group = ID), color = "lightgray", alpha = .05) +
geom_half_boxplot(
data = EMA_5.5_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = -.28),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = FALSE, width = .2,
fill = "dodgerblue") +
geom_half_boxplot(
data = EMA_5.5_ts %>% filter(Interval == "2"), aes(x = Interval, y = Mean), position = position_nudge(x = .18),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = FALSE, width = .2,
fill = "darkorange") +
geom_half_violin(
data = EMA_5.5_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = -.3),
side = "l", fill = "dodgerblue") +
geom_half_violin(
data = EMA_5.5_ts %>% filter(Interval == "2"),aes(x = Interval, y = Mean), position = position_nudge(x = .3),
side = "r", fill = "darkorange") +
geom_point(data = EMA_5.5_ts %>% filter(Interval == "1"), aes(x = Interval, y = score_mean[1]),
position = position_nudge(x = -.13), color = "dodgerblue", alpha = .6, size = 1.5) +
geom_errorbar(data = EMA_5.5_ts %>% filter(Interval == "1"), aes(x = Interval, y = score_mean[1],
ymin = score_mean[1]-ci[1], ymax = score_mean[1]+ci[1]),
position = position_nudge(-.13), color = "dodgerblue", width = 0.05, size = 0.4, alpha = .6) +
geom_point(data = EMA_5.5_ts %>% filter(Interval == "2"), aes(x = Interval, y = score_mean[2]),
position = position_nudge(x = .13), color = "darkorange", alpha = .6, size = 1.5)+
geom_errorbar(data = EMA_5.5_ts %>% filter(Interval == "2"), aes(x = Interval, y = score_mean[2],
ymin = score_mean[2]-ci[2], ymax = score_mean[2]+ci[2]),
position = position_nudge(.13), color = "darkorange", width = 0.05, size = 0.4, alpha = .6) +
geom_line(data = summary_df, aes(x = x_tick_means, y = score_mean), color = "gray", size = 1) +
scale_x_continuous(breaks = c(1,2), labels = c("PRE", "POST"), limits = c(0, 3)) +
xlab("Interval") + ylab("PHQ-9 Mean Score") +
#ggtitle("EMA Data (5+5 Timepoints): Individual Pre-Post Means") +
#theme_classic() +
theme_bw() +
coord_cartesian(ylim = c(0, 24))
ggsave("Time Series Dataframes/k20_EMA_5.5_n100_Pre-Post_Box_Violin_Mean+CI.jpg", plot = Pre_Post_Box_Violin_Mean_CI, width = 6, height = 4)
save(Pre_Post_Box_Violin_Mean_CI, file = "Time Series Dataframes/k20_EMA_5.5_n100_Pre_Post_Box_Violin_Mean_CI.RData")#knitr::include_graphics("Time Series Dataframes/k20_EMA_5.5_n100_Pre-Post_Box_Violin.jpg")
knitr::include_graphics("Time Series Dataframes/k20_EMA_5.5_n100_Pre-Post_Box_Violin_Mean+CI.jpg")EMA_30.30 %>%
select(-(ID1_PRE:ID6_POST)) %>%
within(., {ind.pretestSD = round(ind.pretestSD, digits = 2)
ind.posttestSD = round(ind.posttestSD, digits = 2)}) %>%
head() %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE) %>%
scroll_box(width = "100%")| ID | PRE1_1 | PRE1_2 | PRE1_3 | PRE1_4 | PRE1_5 | PRE1_6 | PRE1_7 | PRE1_8 | PRE1_9 | PRE1_10 | PRE1_11 | PRE1_12 | PRE1_13 | PRE1_14 | PRE1_15 | PRE1_16 | PRE1_17 | PRE1_18 | PRE1_19 | PRE1_20 | PRE1_21 | PRE1_22 | PRE1_23 | PRE1_24 | PRE1_25 | PRE1_26 | PRE1_27 | PRE1_28 | PRE1_29 | PRE1_30 | POST1_1 | POST1_2 | POST1_3 | POST1_4 | POST1_5 | POST1_6 | POST1_7 | POST1_8 | POST1_9 | POST1_10 | POST1_11 | POST1_12 | POST1_13 | POST1_14 | POST1_15 | POST1_16 | POST1_17 | POST1_18 | POST1_19 | POST1_20 | POST1_21 | POST1_22 | POST1_23 | POST1_24 | POST1_25 | POST1_26 | POST1_27 | POST1_28 | POST1_29 | POST1_30 | PRE_Mean | POST_Mean | MeanDiff | ind.pretestSD | ind.posttestSD |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 16 | 13 | 9 | 13 | 11 | 9 | 10 | 12 | 13 | 12 | 8 | 13 | 13 | 9 | 11 | 9 | 12 | 9 | 10 | 10 | 14 | 9 | 11 | 9 | 13 | 13 | 9 | 9 | 11 | 13 | 13 | 10 | 5 | 9 | 9 | 13 | 13 | 10 | 5 | 9 | 9 | 7 | 11 | 9 | 13 | 6 | 9 | 6 | 11 | 7 | 13 | 7 | 9 | 13 | 11 | 6 | 13 | 9 | 10 | 5 | 9 | 11.0 | 9.2 | 1.8 | 1.82 | 2.61 |
| 33 | 8 | 8 | 7 | 0 | 12 | 10 | 6 | 11 | 8 | 0 | 10 | 11 | 0 | 8 | 6 | 14 | 6 | 4 | 3 | 8 | 6 | 8 | 0 | 10 | 11 | 0 | 6 | 11 | 10 | 8 | 4 | 1 | 5 | 6 | 8 | 5 | 1 | 4 | 6 | 8 | 3 | 4 | 7 | 2 | 8 | 6 | 2 | 7 | 7 | 2 | 4 | 1 | 8 | 5 | 6 | 3 | 4 | 7 | 8 | 2 | 7.0 | 4.8 | 2.2 | 3.97 | 2.35 |
| 82 | 12 | 10 | 13 | 9 | 10 | 12 | 9 | 12 | 12 | 9 | 12 | 13 | 10 | 10 | 9 | 9 | 12 | 9 | 12 | 12 | 12 | 13 | 10 | 9 | 10 | 12 | 13 | 9 | 10 | 10 | 10 | 5 | 3 | 5 | 8 | 2 | 8 | 9 | 7 | 5 | 7 | 2 | 8 | 9 | 5 | 9 | 6 | 9 | 4 | 3 | 9 | 8 | 5 | 2 | 7 | 4 | 10 | 7 | 3 | 7 | 10.8 | 6.2 | 4.6 | 1.49 | 2.52 |
| 103 | 14 | 11 | 11 | 11 | 10 | 11 | 10 | 11 | 14 | 11 | 10 | 10 | 13 | 11 | 13 | 11 | 9 | 13 | 12 | 12 | 11 | 10 | 10 | 13 | 13 | 9 | 12 | 12 | 11 | 13 | 15 | 7 | 7 | 9 | 6 | 7 | 5 | 7 | 14 | 11 | 7 | 6 | 9 | 15 | 7 | 6 | 7 | 9 | 15 | 7 | 7 | 7 | 11 | 14 | 5 | 7 | 14 | 11 | 7 | 5 | 11.4 | 8.8 | 2.6 | 1.38 | 3.31 |
| 259 | 6 | 6 | 6 | 7 | 11 | 10 | 4 | 8 | 7 | 7 | 7 | 10 | 8 | 7 | 4 | 10 | 9 | 5 | 6 | 6 | 6 | 6 | 11 | 6 | 7 | 8 | 9 | 6 | 4 | 9 | 15 | 12 | 5 | 9 | 9 | 8 | 13 | 15 | 7 | 7 | 6 | 6 | 12 | 12 | 14 | 8 | 11 | 11 | 15 | 5 | 9 | 13 | 11 | 13 | 4 | 7 | 7 | 13 | 15 | 8 | 7.2 | 10.0 | -2.8 | 1.97 | 3.40 |
| 299 | 18 | 14 | 13 | 7 | 9 | 9 | 9 | 10 | 14 | 19 | 15 | 15 | 8 | 7 | 16 | 18 | 13 | 11 | 13 | 6 | 18 | 13 | 14 | 7 | 9 | 14 | 19 | 10 | 9 | 9 | 16 | 13 | 10 | 4 | 7 | 15 | 12 | 13 | 6 | 4 | 6 | 18 | 9 | 10 | 7 | 10 | 8 | 4 | 17 | 11 | 14 | 11 | 10 | 13 | 2 | 10 | 3 | 9 | 12 | 16 | 12.2 | 10.0 | 2.2 | 3.93 | 4.32 |
Pre-Post-Verläufe für 9 zufällig gezogene Personen
rand = sample(EMA_30.30$ID, 9)
x = tibble(ID = c(rep(rand[1],times=61),
rep(rand[2],times=61),
rep(rand[3],times=61),
rep(rand[4],times=61),
rep(rand[5],times=61),
rep(rand[6],times=61),
rep(rand[7],times=61),
rep(rand[8],times=61),
rep(rand[9],times=61)),
MZP = rep(seq(as.Date("2020-01-01"), length.out=61, by="1 day"), times=9),
Score = c(as.numeric(EMA_30.30[rand[1],pre_30mzp]), NA, as.numeric(EMA_30.30[rand[1],post_30mzp]),
as.numeric(EMA_30.30[rand[2],pre_30mzp]), NA, as.numeric(EMA_30.30[rand[2],post_30mzp]),
as.numeric(EMA_30.30[rand[3],pre_30mzp]), NA, as.numeric(EMA_30.30[rand[3],post_30mzp]),
as.numeric(EMA_30.30[rand[4],pre_30mzp]), NA, as.numeric(EMA_30.30[rand[4],post_30mzp]),
as.numeric(EMA_30.30[rand[5],pre_30mzp]), NA, as.numeric(EMA_30.30[rand[5],post_30mzp]),
as.numeric(EMA_30.30[rand[6],pre_30mzp]), NA, as.numeric(EMA_30.30[rand[6],post_30mzp]),
as.numeric(EMA_30.30[rand[7],pre_30mzp]), NA, as.numeric(EMA_30.30[rand[7],post_30mzp]),
as.numeric(EMA_30.30[rand[8],pre_30mzp]), NA, as.numeric(EMA_30.30[rand[8],post_30mzp]),
as.numeric(EMA_30.30[rand[9],pre_30mzp]), NA, as.numeric(EMA_30.30[rand[9],post_30mzp])))
x %>%
group_by(ID) %>%
plot_time_series(MZP, Score,
#.color_var = ID, # for multiple lines in one plot
#.color_lab = "ID",
.facet_ncol = 3,
.facet_scales = "fixed",
.interactive = TRUE,
.facet_collapse = FALSE,
.smooth = TRUE,
.smooth_degree = 2,
.smooth_alpha = 0.5,
.smooth_size = 0.2
)# don´t run this section (code for extremely computation-intense plots that I already stored as .RData and .jpg)
# repeated-measures scatter-boxplot-violin-histograms for individual PRE and POST means
# from van Langen (2020) Open-visualizations tutorial for repeated measures in R
# EMA_30.30
# converting my dataframes to use in the same ggplot structure:
EMA_30.30_ts = EMA_30.30 %>%
select(ID, PRE_Mean, POST_Mean) %>%
pivot_longer(!ID, names_to = "Interval", values_to = "Mean") %>%
mutate(ID = as.factor(ID),
Interval = rep(c(1,2), times = nrow(EMA_30.30)))
save(EMA_30.30_ts, file = "Time Series Dataframes/k20_EMA_30.30_n100_ts.RData")
###
load("Time Series Dataframes/k20_EMA_30.30_n100_ts.RData")
# Repeated measures with box− and violin plots
EMA_30.30_ts$jit = jitter(EMA_30.30_ts$Interval, amount = .09)
Pre_Post_Box_Violin = ggplot(data = EMA_30.30_ts, aes(y = Mean)) +
geom_point(data = EMA_30.30_ts %>% filter(Interval == "1"), aes(x = jit), color = "dodgerblue", size = 1,
alpha = .5) +
geom_point(data = EMA_30.30_ts %>% filter(Interval == "2"), aes(x = jit), color = "darkorange", size = 1,
alpha = .5) +
geom_line(aes(x = jit, group = ID), color = "lightgray", alpha = .05) +
geom_half_boxplot(
data = EMA_30.30_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = -.25),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = TRUE, width = .1,
fill = "dodgerblue", alpha = .5) +
geom_half_boxplot(
data = EMA_30.30_ts %>% filter(Interval == "2"), aes(x = Interval, y = Mean), position = position_nudge(x = .15),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = TRUE, width = .1,
fill = "darkorange", alpha = .5) +
geom_half_violin(
data = EMA_30.30_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = 1.3),
side = "r", fill = "dodgerblue", alpha = .5, trim = FALSE) +
geom_half_violin(
data = EMA_30.30_ts %>% filter(Interval == "2"), aes(x = Interval, y = Mean), position = position_nudge(x = .3),
side = "r", fill = "darkorange", alpha = .5, trim = FALSE) +
scale_x_continuous(breaks = c(1,2), labels = c("PRE", "POST"), limits = c(0, 3)) +
xlab("Interval") + ylab("PHQ-9 Mean Score") +
#ggtitle("EMA Data (30+30 Timepoints): Individual Pre-Post Means") +
#theme_classic() +
theme_bw() +
coord_cartesian(ylim = c(0, 24))
ggsave("Time Series Dataframes/k20_EMA_30.30_n100_Pre-Post_Box_Violin.jpg", plot = Pre_Post_Box_Violin, width = 6, height = 4)
save(Pre_Post_Box_Violin, file = "Time Series Dataframes/k20_EMA_30.30_n100_Pre_Post_Box_Violin.RData")
# Repeated measures with box− and violin plots and means + CIs
score_mean_1 = EMA_30.30_ts %>% filter(Interval == "1") %>% summarise(mean(Mean)) %>% as.numeric()
score_mean_2 = EMA_30.30_ts %>% filter(Interval == "2") %>% summarise(mean(Mean)) %>% as.numeric()
score_median1 = EMA_30.30_ts %>% filter(Interval == "1") %>% summarise(median(Mean)) %>% as.numeric()
score_median2 = EMA_30.30_ts %>% filter(Interval == "2") %>% summarise(median(Mean)) %>% as.numeric()
score_sd_1 = EMA_30.30_ts %>% filter(Interval == "1") %>% summarise(sd(Mean)) %>% as.numeric()
score_sd_2 = EMA_30.30_ts %>% filter(Interval == "2") %>% summarise(sd(Mean)) %>% as.numeric()
score_se_1 = score_sd_1/sqrt(nrow(EMA_30.30))
score_se_2 = score_sd_2/sqrt(nrow(EMA_30.30))
score_ci_1 = EMA_30.30_ts %>% filter(Interval == "1") %>% pull(Mean) %>% CI(., ci = 0.95)
score_ci_2 = EMA_30.30_ts %>% filter(Interval == "2") %>% pull(Mean) %>% CI(., ci = 0.95)
#Create data frame with 2 rows and 7 columns containing the descriptives
group = c("PRE", "POST")
N = c(nrow(EMA_30.30), nrow(EMA_30.30))
score_mean = c(score_mean_1, score_mean_2)
score_median = c(score_median1, score_median2)
sd = c(score_sd_1, score_sd_2)
se = c(score_se_1, score_se_2)
ci = c(as.numeric(score_ci_1[1] - score_ci_1[3]), as.numeric(score_ci_2[1] - score_ci_2[3]))
summary_df = data.frame(group, N, score_mean, score_median, sd, se, ci)
# EMA_30.30_ts$jit = jitter(EMA_30.30_ts$Interval, amount = .09) #already created above
x_tick_means = c(.87, 2.13)
Pre_Post_Box_Violin_Mean_CI = ggplot(data = EMA_30.30_ts, aes(y = Mean)) +
geom_point(data = EMA_30.30_ts %>% filter(Interval == "1"), aes(x = jit), color = "dodgerblue", size = 1,
alpha = .6) +
geom_point(data = EMA_30.30_ts %>% filter(Interval == "2"), aes(x = jit), color = "darkorange", size = 1,
alpha = .6) +
geom_line(aes(x = jit, group = ID), color = "lightgray", alpha = .05) +
geom_half_boxplot(
data = EMA_30.30_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = -.28),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = FALSE, width = .2,
fill = "dodgerblue") +
geom_half_boxplot(
data = EMA_30.30_ts %>% filter(Interval == "2"), aes(x = Interval, y = Mean), position = position_nudge(x = .18),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = FALSE, width = .2,
fill = "darkorange") +
geom_half_violin(
data = EMA_30.30_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = -.3),
side = "l", fill = "dodgerblue") +
geom_half_violin(
data = EMA_30.30_ts %>% filter(Interval == "2"),aes(x = Interval, y = Mean), position = position_nudge(x = .3),
side = "r", fill = "darkorange") +
geom_point(data = EMA_30.30_ts %>% filter(Interval == "1"), aes(x = Interval, y = score_mean[1]),
position = position_nudge(x = -.13), color = "dodgerblue", alpha = .6, size = 1.5) +
geom_errorbar(data = EMA_30.30_ts %>% filter(Interval == "1"), aes(x = Interval, y = score_mean[1],
ymin = score_mean[1]-ci[1], ymax = score_mean[1]+ci[1]),
position = position_nudge(-.13), color = "dodgerblue", width = 0.05, size = 0.4, alpha = .6) +
geom_point(data = EMA_30.30_ts %>% filter(Interval == "2"), aes(x = Interval, y = score_mean[2]),
position = position_nudge(x = .13), color = "darkorange", alpha = .6, size = 1.5)+
geom_errorbar(data = EMA_30.30_ts %>% filter(Interval == "2"), aes(x = Interval, y = score_mean[2],
ymin = score_mean[2]-ci[2], ymax = score_mean[2]+ci[2]),
position = position_nudge(.13), color = "darkorange", width = 0.05, size = 0.4, alpha = .6) +
geom_line(data = summary_df, aes(x = x_tick_means, y = score_mean), color = "gray", size = 1) +
scale_x_continuous(breaks = c(1,2), labels = c("PRE", "POST"), limits = c(0, 3)) +
xlab("Interval") + ylab("PHQ-9 Mean Score") +
#ggtitle("EMA Data (30+30 Timepoints): Individual Pre-Post Means") +
#theme_classic() +
theme_bw() +
coord_cartesian(ylim = c(0, 24))
ggsave("Time Series Dataframes/k20_EMA_30.30_n100_Pre-Post_Box_Violin_Mean+CI.jpg", plot = Pre_Post_Box_Violin_Mean_CI, width = 6, height = 4)
save(Pre_Post_Box_Violin_Mean_CI, file = "Time Series Dataframes/k20_EMA_30.30_n100_Pre_Post_Box_Violin_Mean_CI.RData")#knitr::include_graphics("Time Series Dataframes/k20_EMA_30.30_n100_Pre-Post_Box_Violin.jpg")
knitr::include_graphics("Time Series Dataframes/k20_EMA_30.30_n100_Pre-Post_Box_Violin_Mean+CI.jpg")EMA_5.5_Window %>%
within(., {ind.pretestSD = round(ind.pretestSD, digits = 2)
ind.posttestSD = round(ind.posttestSD, digits = 2)}) %>%
head() %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE) %>%
scroll_box(width = "100%")| ID | Pre_MZP1 | Pre_MZP2 | Pre_MZP3 | Pre_MZP4 | Pre_MZP5 | Post_MZP1 | Post_MZP2 | Post_MZP3 | Post_MZP4 | Post_MZP5 | PRE1_1 | PRE1_2 | PRE1_3 | PRE1_4 | PRE1_5 | POST1_1 | POST1_2 | POST1_3 | POST1_4 | POST1_5 | PRE_Mean | POST_Mean | MeanDiff | ind.pretestSD | ind.posttestSD |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 16 | PRE1_1 | PRE1_2 | PRE1_3 | PRE1_4 | PRE1_5 | POST1_10 | POST1_11 | POST1_12 | POST1_13 | POST1_14 | 13 | 9 | 13 | 11 | 9 | 9 | 7 | 11 | 9 | 13 | 11.0 | 9.8 | 1.2 | 2.00 | 2.28 |
| 33 | PRE1_6 | PRE1_7 | PRE1_8 | PRE1_9 | PRE1_10 | POST1_26 | POST1_27 | POST1_28 | POST1_29 | POST1_30 | 10 | 6 | 11 | 8 | 0 | 3 | 4 | 7 | 8 | 2 | 7.0 | 4.8 | 2.2 | 4.36 | 2.59 |
| 82 | PRE1_12 | PRE1_13 | PRE1_14 | PRE1_15 | PRE1_16 | POST1_26 | POST1_27 | POST1_28 | POST1_29 | POST1_30 | 13 | 10 | 10 | 9 | 9 | 4 | 10 | 7 | 3 | 7 | 10.2 | 6.2 | 4.0 | 1.64 | 2.77 |
| 103 | PRE1_20 | PRE1_21 | PRE1_22 | PRE1_23 | PRE1_24 | POST1_1 | POST1_2 | POST1_3 | POST1_4 | POST1_5 | 12 | 11 | 10 | 10 | 13 | 15 | 7 | 7 | 9 | 6 | 11.2 | 8.8 | 2.4 | 1.30 | 3.63 |
| 259 | PRE1_2 | PRE1_3 | PRE1_4 | PRE1_5 | PRE1_6 | POST1_7 | POST1_8 | POST1_9 | POST1_10 | POST1_11 | 6 | 6 | 7 | 11 | 10 | 13 | 15 | 7 | 7 | 6 | 8.0 | 9.6 | -1.6 | 2.35 | 4.10 |
| 299 | PRE1_17 | PRE1_18 | PRE1_19 | PRE1_20 | PRE1_21 | POST1_26 | POST1_27 | POST1_28 | POST1_29 | POST1_30 | 13 | 11 | 13 | 6 | 18 | 10 | 3 | 9 | 12 | 16 | 12.2 | 10.0 | 2.2 | 4.32 | 4.74 |
Pre-Post-Verläufe für 9 zufällig gezogene Personen
rand = sample(EMA_5.5_Window$ID, 9)
x = tibble(ID = c(rep(rand[1],times=11),
rep(rand[2],times=11),
rep(rand[3],times=11),
rep(rand[4],times=11),
rep(rand[5],times=11),
rep(rand[6],times=11),
rep(rand[7],times=11),
rep(rand[8],times=11),
rep(rand[9],times=11)),
MZP = rep(seq(as.Date("2020-01-01"), length.out=11, by="1 day"), times=9),
Score = c(as.numeric(EMA_5.5_Window[rand[1],pre_5mzp]), NA, as.numeric(EMA_5.5_Window[rand[1],post_5mzp]),
as.numeric(EMA_5.5_Window[rand[2],pre_5mzp]), NA, as.numeric(EMA_5.5_Window[rand[2],post_5mzp]),
as.numeric(EMA_5.5_Window[rand[3],pre_5mzp]), NA, as.numeric(EMA_5.5_Window[rand[3],post_5mzp]),
as.numeric(EMA_5.5_Window[rand[4],pre_5mzp]), NA, as.numeric(EMA_5.5_Window[rand[4],post_5mzp]),
as.numeric(EMA_5.5_Window[rand[5],pre_5mzp]), NA, as.numeric(EMA_5.5_Window[rand[5],post_5mzp]),
as.numeric(EMA_5.5_Window[rand[6],pre_5mzp]), NA, as.numeric(EMA_5.5_Window[rand[6],post_5mzp]),
as.numeric(EMA_5.5_Window[rand[7],pre_5mzp]), NA, as.numeric(EMA_5.5_Window[rand[7],post_5mzp]),
as.numeric(EMA_5.5_Window[rand[8],pre_5mzp]), NA, as.numeric(EMA_5.5_Window[rand[8],post_5mzp]),
as.numeric(EMA_5.5_Window[rand[9],pre_5mzp]), NA, as.numeric(EMA_5.5_Window[rand[9],post_5mzp])))
x %>%
group_by(ID) %>%
plot_time_series(MZP, Score,
#.color_var = ID, # for multiple lines in one plot
#.color_lab = "ID",
.facet_ncol = 3,
.facet_scales = "fixed",
.interactive = TRUE,
.facet_collapse = FALSE,
.smooth = TRUE,
.smooth_degree = 2,
.smooth_alpha = 0.5,
.smooth_size = 0.2
)# don´t run this section (code for extremely computation-intense plots that I already stored as .RData and .jpg)
# repeated-measures scatter-boxplot-violin-histograms for individual PRE and POST means
# from van Langen (2020) Open-visualizations tutorial for repeated measures in R
# EMA_5.5_Window
# converting my dataframes to use in the same ggplot structure:
EMA_5.5_Window_ts = EMA_5.5_Window %>%
select(ID, PRE_Mean, POST_Mean) %>%
pivot_longer(!ID, names_to = "Interval", values_to = "Mean") %>%
mutate(ID = as.factor(ID),
Interval = rep(c(1,2), times = nrow(EMA_5.5_Window)))
save(EMA_5.5_Window_ts, file = "Time Series Dataframes/k20_EMA_5.5_Window_n100_ts.RData")
###
load("Time Series Dataframes/k20_EMA_5.5_Window_n100_ts.RData")
# Repeated measures with box− and violin plots
EMA_5.5_Window_ts$jit = jitter(EMA_5.5_Window_ts$Interval, amount = .09)
Pre_Post_Box_Violin = ggplot(data = EMA_5.5_Window_ts, aes(y = Mean)) +
geom_point(data = EMA_5.5_Window_ts %>% filter(Interval == "1"), aes(x = jit), color = "dodgerblue", size = 1,
alpha = .5) +
geom_point(data = EMA_5.5_Window_ts %>% filter(Interval == "2"), aes(x = jit), color = "darkorange", size = 1,
alpha = .5) +
geom_line(aes(x = jit, group = ID), color = "lightgray", alpha = .05) +
geom_half_boxplot(
data = EMA_5.5_Window_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = -.25),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = TRUE, width = .1,
fill = "dodgerblue", alpha = .5) +
geom_half_boxplot(
data = EMA_5.5_Window_ts %>% filter(Interval == "2"), aes(x = Interval, y = Mean), position = position_nudge(x = .15),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = TRUE, width = .1,
fill = "darkorange", alpha = .5) +
geom_half_violin(
data = EMA_5.5_Window_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = 1.3),
side = "r", fill = "dodgerblue", alpha = .5, trim = FALSE) +
geom_half_violin(
data = EMA_5.5_Window_ts %>% filter(Interval == "2"), aes(x = Interval, y = Mean), position = position_nudge(x = .3),
side = "r", fill = "darkorange", alpha = .5, trim = FALSE) +
scale_x_continuous(breaks = c(1,2), labels = c("PRE", "POST"), limits = c(0, 3)) +
xlab("Interval") + ylab("PHQ-9 Mean Score") +
#ggtitle("EMA Data (5+5 Timepoint Random Windows): Individual Pre-Post Means") +
#theme_classic() +
theme_bw() +
coord_cartesian(ylim = c(0, 24))
ggsave("Time Series Dataframes/k20_EMA_5.5_Window_n100_Pre-Post_Box_Violin.jpg", plot = Pre_Post_Box_Violin, width = 6, height = 4)
save(Pre_Post_Box_Violin, file = "Time Series Dataframes/k20_EMA_5.5_Window_n100_Pre_Post_Box_Violin.RData")
# Repeated measures with box− and violin plots and means + CIs
score_mean_1 = EMA_5.5_Window_ts %>% filter(Interval == "1") %>% summarise(mean(Mean)) %>% as.numeric()
score_mean_2 = EMA_5.5_Window_ts %>% filter(Interval == "2") %>% summarise(mean(Mean)) %>% as.numeric()
score_median1 = EMA_5.5_Window_ts %>% filter(Interval == "1") %>% summarise(median(Mean)) %>% as.numeric()
score_median2 = EMA_5.5_Window_ts %>% filter(Interval == "2") %>% summarise(median(Mean)) %>% as.numeric()
score_sd_1 = EMA_5.5_Window_ts %>% filter(Interval == "1") %>% summarise(sd(Mean)) %>% as.numeric()
score_sd_2 = EMA_5.5_Window_ts %>% filter(Interval == "2") %>% summarise(sd(Mean)) %>% as.numeric()
score_se_1 = score_sd_1/sqrt(nrow(EMA_5.5_Window))
score_se_2 = score_sd_2/sqrt(nrow(EMA_5.5_Window))
score_ci_1 = EMA_5.5_Window_ts %>% filter(Interval == "1") %>% pull(Mean) %>% CI(., ci = 0.95)
score_ci_2 = EMA_5.5_Window_ts %>% filter(Interval == "2") %>% pull(Mean) %>% CI(., ci = 0.95)
#Create data frame with 2 rows and 7 columns containing the descriptives
group = c("PRE", "POST")
N = c(nrow(EMA_5.5_Window), nrow(EMA_5.5_Window))
score_mean = c(score_mean_1, score_mean_2)
score_median = c(score_median1, score_median2)
sd = c(score_sd_1, score_sd_2)
se = c(score_se_1, score_se_2)
ci = c(as.numeric(score_ci_1[1] - score_ci_1[3]), as.numeric(score_ci_2[1] - score_ci_2[3]))
summary_df = data.frame(group, N, score_mean, score_median, sd, se, ci)
# EMA_5.5_Window_ts$jit = jitter(EMA_5.5_Window_ts$Interval, amount = .09) #already created above
x_tick_means = c(.87, 2.13)
Pre_Post_Box_Violin_Mean_CI = ggplot(data = EMA_5.5_Window_ts, aes(y = Mean)) +
geom_point(data = EMA_5.5_Window_ts %>% filter(Interval == "1"), aes(x = jit), color = "dodgerblue", size = 1,
alpha = .6) +
geom_point(data = EMA_5.5_Window_ts %>% filter(Interval == "2"), aes(x = jit), color = "darkorange", size = 1,
alpha = .6) +
geom_line(aes(x = jit, group = ID), color = "lightgray", alpha = .05) +
geom_half_boxplot(
data = EMA_5.5_Window_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = -.28),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = FALSE, width = .2,
fill = "dodgerblue") +
geom_half_boxplot(
data = EMA_5.5_Window_ts %>% filter(Interval == "2"), aes(x = Interval, y = Mean), position = position_nudge(x = .18),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = FALSE, width = .2,
fill = "darkorange") +
geom_half_violin(
data = EMA_5.5_Window_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = -.3),
side = "l", fill = "dodgerblue") +
geom_half_violin(
data = EMA_5.5_Window_ts %>% filter(Interval == "2"),aes(x = Interval, y = Mean), position = position_nudge(x = .3),
side = "r", fill = "darkorange") +
geom_point(data = EMA_5.5_Window_ts %>% filter(Interval == "1"), aes(x = Interval, y = score_mean[1]),
position = position_nudge(x = -.13), color = "dodgerblue", alpha = .6, size = 1.5) +
geom_errorbar(data = EMA_5.5_Window_ts %>% filter(Interval == "1"), aes(x = Interval, y = score_mean[1],
ymin = score_mean[1]-ci[1], ymax = score_mean[1]+ci[1]),
position = position_nudge(-.13), color = "dodgerblue", width = 0.05, size = 0.4, alpha = .6) +
geom_point(data = EMA_5.5_Window_ts %>% filter(Interval == "2"), aes(x = Interval, y = score_mean[2]),
position = position_nudge(x = .13), color = "darkorange", alpha = .6, size = 1.5)+
geom_errorbar(data = EMA_5.5_Window_ts %>% filter(Interval == "2"), aes(x = Interval, y = score_mean[2],
ymin = score_mean[2]-ci[2], ymax = score_mean[2]+ci[2]),
position = position_nudge(.13), color = "darkorange", width = 0.05, size = 0.4, alpha = .6) +
geom_line(data = summary_df, aes(x = x_tick_means, y = score_mean), color = "gray", size = 1) +
scale_x_continuous(breaks = c(1,2), labels = c("PRE", "POST"), limits = c(0, 3)) +
xlab("Interval") + ylab("PHQ-9 Mean Score") +
#ggtitle("EMA Data (5+5 Timepoint Random Windows): Individual Pre-Post Means") +
#theme_classic() +
theme_bw() +
coord_cartesian(ylim = c(0, 24))
ggsave("Time Series Dataframes/k20_EMA_5.5_Window_n100_Pre-Post_Box_Violin_Mean+CI.jpg", plot = Pre_Post_Box_Violin_Mean_CI, width = 6, height = 4)
save(Pre_Post_Box_Violin_Mean_CI, file = "Time Series Dataframes/k20_EMA_5.5_Window_n100_Pre_Post_Box_Violin_Mean_CI.RData")#knitr::include_graphics("Time Series Dataframes/k20_EMA_5.5_Window_n100_Pre-Post_Box_Violin.jpg")
knitr::include_graphics("Time Series Dataframes/k20_EMA_5.5_Window_n100_Pre-Post_Box_Violin_Mean+CI.jpg")EMA_5.5_Days %>%
within(., {ind.pretestSD = round(ind.pretestSD, digits = 2)
ind.posttestSD = round(ind.posttestSD, digits = 2)}) %>%
head() %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE) %>%
scroll_box(width = "100%")| ID | Pre_MZP1 | Pre_MZP2 | Pre_MZP3 | Pre_MZP4 | Pre_MZP5 | Post_MZP1 | Post_MZP2 | Post_MZP3 | Post_MZP4 | Post_MZP5 | PRE1_1 | PRE1_2 | PRE1_3 | PRE1_4 | PRE1_5 | POST1_1 | POST1_2 | POST1_3 | POST1_4 | POST1_5 | PRE_Mean | POST_Mean | MeanDiff | ind.pretestSD | ind.posttestSD |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 16 | PRE1_6 | PRE1_14 | PRE1_15 | PRE1_24 | PRE1_29 | POST1_5 | POST1_11 | POST1_16 | POST1_17 | POST1_22 | 10 | 11 | 9 | 13 | 13 | 13 | 7 | 9 | 6 | 9 | 11.2 | 8.8 | 2.4 | 1.79 | 2.68 |
| 33 | PRE1_17 | PRE1_22 | PRE1_25 | PRE1_27 | PRE1_30 | POST1_12 | POST1_21 | POST1_27 | POST1_28 | POST1_30 | 6 | 8 | 11 | 6 | 8 | 4 | 4 | 4 | 7 | 2 | 7.8 | 4.2 | 3.6 | 2.05 | 1.79 |
| 82 | PRE1_17 | PRE1_20 | PRE1_22 | PRE1_26 | PRE1_30 | POST1_8 | POST1_15 | POST1_19 | POST1_25 | POST1_30 | 12 | 12 | 13 | 12 | 10 | 9 | 5 | 4 | 7 | 7 | 11.8 | 6.4 | 5.4 | 1.10 | 1.95 |
| 103 | PRE1_2 | PRE1_9 | PRE1_10 | PRE1_16 | PRE1_23 | POST1_2 | POST1_8 | POST1_15 | POST1_17 | POST1_23 | 11 | 14 | 11 | 11 | 10 | 7 | 7 | 7 | 7 | 11 | 11.4 | 7.8 | 3.6 | 1.52 | 1.79 |
| 259 | PRE1_7 | PRE1_11 | PRE1_12 | PRE1_19 | PRE1_24 | POST1_1 | POST1_9 | POST1_17 | POST1_21 | POST1_29 | 4 | 7 | 10 | 6 | 6 | 15 | 7 | 11 | 9 | 15 | 6.6 | 11.4 | -4.8 | 2.19 | 3.58 |
| 299 | PRE1_4 | PRE1_7 | PRE1_19 | PRE1_26 | PRE1_28 | POST1_12 | POST1_22 | POST1_25 | POST1_26 | POST1_27 | 7 | 9 | 13 | 14 | 10 | 18 | 11 | 2 | 10 | 3 | 10.6 | 8.8 | 1.8 | 2.88 | 6.53 |
Pre-Post-Verläufe für 9 zufällig gezogene Personen
rand = sample(EMA_5.5_Days$ID, 9)
x = tibble(ID = c(rep(rand[1],times=11),
rep(rand[2],times=11),
rep(rand[3],times=11),
rep(rand[4],times=11),
rep(rand[5],times=11),
rep(rand[6],times=11),
rep(rand[7],times=11),
rep(rand[8],times=11),
rep(rand[9],times=11)),
MZP = rep(seq(as.Date("2020-01-01"), length.out=11, by="1 day"), times=9),
Score = c(as.numeric(EMA_5.5_Days[rand[1],pre_5mzp]), NA, as.numeric(EMA_5.5_Days[rand[1],post_5mzp]),
as.numeric(EMA_5.5_Days[rand[2],pre_5mzp]), NA, as.numeric(EMA_5.5_Days[rand[2],post_5mzp]),
as.numeric(EMA_5.5_Days[rand[3],pre_5mzp]), NA, as.numeric(EMA_5.5_Days[rand[3],post_5mzp]),
as.numeric(EMA_5.5_Days[rand[4],pre_5mzp]), NA, as.numeric(EMA_5.5_Days[rand[4],post_5mzp]),
as.numeric(EMA_5.5_Days[rand[5],pre_5mzp]), NA, as.numeric(EMA_5.5_Days[rand[5],post_5mzp]),
as.numeric(EMA_5.5_Days[rand[6],pre_5mzp]), NA, as.numeric(EMA_5.5_Days[rand[6],post_5mzp]),
as.numeric(EMA_5.5_Days[rand[7],pre_5mzp]), NA, as.numeric(EMA_5.5_Days[rand[7],post_5mzp]),
as.numeric(EMA_5.5_Days[rand[8],pre_5mzp]), NA, as.numeric(EMA_5.5_Days[rand[8],post_5mzp]),
as.numeric(EMA_5.5_Days[rand[9],pre_5mzp]), NA, as.numeric(EMA_5.5_Days[rand[9],post_5mzp])))
x %>%
group_by(ID) %>%
plot_time_series(MZP, Score,
#.color_var = ID, # for multiple lines in one plot
#.color_lab = "ID",
.facet_ncol = 3,
.facet_scales = "fixed",
.interactive = TRUE,
.facet_collapse = FALSE,
.smooth = TRUE,
.smooth_degree = 2,
.smooth_alpha = 0.5,
.smooth_size = 0.2
)# don´t run this section (code for extremely computation-intense plots that I already stored as .RData and .jpg)
# repeated-measures scatter-boxplot-violin-histograms for individual PRE and POST means
# from van Langen (2020) Open-visualizations tutorial for repeated measures in R
# EMA_5.5_Days
# converting my dataframes to use in the same ggplot structure:
EMA_5.5_Days_ts = EMA_5.5_Days %>%
select(ID, PRE_Mean, POST_Mean) %>%
pivot_longer(!ID, names_to = "Interval", values_to = "Mean") %>%
mutate(ID = as.factor(ID),
Interval = rep(c(1,2), times = nrow(EMA_5.5_Days)))
save(EMA_5.5_Days_ts, file = "Time Series Dataframes/k20_EMA_5.5_Days_n100_ts.RData")
###
load("Time Series Dataframes/k20_EMA_5.5_Days_n100_ts.RData")
# Repeated measures with box− and violin plots
EMA_5.5_Days_ts$jit = jitter(EMA_5.5_Days_ts$Interval, amount = .09)
Pre_Post_Box_Violin = ggplot(data = EMA_5.5_Days_ts, aes(y = Mean)) +
geom_point(data = EMA_5.5_Days_ts %>% filter(Interval == "1"), aes(x = jit), color = "dodgerblue", size = 1,
alpha = .5) +
geom_point(data = EMA_5.5_Days_ts %>% filter(Interval == "2"), aes(x = jit), color = "darkorange", size = 1,
alpha = .5) +
geom_line(aes(x = jit, group = ID), color = "lightgray", alpha = .05) +
geom_half_boxplot(
data = EMA_5.5_Days_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = -.25),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = TRUE, width = .1,
fill = "dodgerblue", alpha = .5) +
geom_half_boxplot(
data = EMA_5.5_Days_ts %>% filter(Interval == "2"), aes(x = Interval, y = Mean), position = position_nudge(x = .15),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = TRUE, width = .1,
fill = "darkorange", alpha = .5) +
geom_half_violin(
data = EMA_5.5_Days_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = 1.3),
side = "r", fill = "dodgerblue", alpha = .5, trim = FALSE) +
geom_half_violin(
data = EMA_5.5_Days_ts %>% filter(Interval == "2"), aes(x = Interval, y = Mean), position = position_nudge(x = .3),
side = "r", fill = "darkorange", alpha = .5, trim = FALSE) +
scale_x_continuous(breaks = c(1,2), labels = c("PRE", "POST"), limits = c(0, 3)) +
xlab("Interval") + ylab("PHQ-9 Mean Score") +
#ggtitle("EMA Data (5+5 Timepoint Random Days): Individual Pre-Post Means") +
#theme_classic() +
theme_bw() +
coord_cartesian(ylim = c(0, 24))
ggsave("Time Series Dataframes/k20_EMA_5.5_Days_n100_Pre-Post_Box_Violin.jpg", plot = Pre_Post_Box_Violin, width = 6, height = 4)
save(Pre_Post_Box_Violin, file = "Time Series Dataframes/k20_EMA_5.5_Days_n100_Pre_Post_Box_Violin.RData")
# Repeated measures with box− and violin plots and means + CIs
score_mean_1 = EMA_5.5_Days_ts %>% filter(Interval == "1") %>% summarise(mean(Mean)) %>% as.numeric()
score_mean_2 = EMA_5.5_Days_ts %>% filter(Interval == "2") %>% summarise(mean(Mean)) %>% as.numeric()
score_median1 = EMA_5.5_Days_ts %>% filter(Interval == "1") %>% summarise(median(Mean)) %>% as.numeric()
score_median2 = EMA_5.5_Days_ts %>% filter(Interval == "2") %>% summarise(median(Mean)) %>% as.numeric()
score_sd_1 = EMA_5.5_Days_ts %>% filter(Interval == "1") %>% summarise(sd(Mean)) %>% as.numeric()
score_sd_2 = EMA_5.5_Days_ts %>% filter(Interval == "2") %>% summarise(sd(Mean)) %>% as.numeric()
score_se_1 = score_sd_1/sqrt(nrow(EMA_5.5_Days))
score_se_2 = score_sd_2/sqrt(nrow(EMA_5.5_Days))
score_ci_1 = EMA_5.5_Days_ts %>% filter(Interval == "1") %>% pull(Mean) %>% CI(., ci = 0.95)
score_ci_2 = EMA_5.5_Days_ts %>% filter(Interval == "2") %>% pull(Mean) %>% CI(., ci = 0.95)
#Create data frame with 2 rows and 7 columns containing the descriptives
group = c("PRE", "POST")
N = c(nrow(EMA_5.5_Days), nrow(EMA_5.5_Days))
score_mean = c(score_mean_1, score_mean_2)
score_median = c(score_median1, score_median2)
sd = c(score_sd_1, score_sd_2)
se = c(score_se_1, score_se_2)
ci = c(as.numeric(score_ci_1[1] - score_ci_1[3]), as.numeric(score_ci_2[1] - score_ci_2[3]))
summary_df = data.frame(group, N, score_mean, score_median, sd, se, ci)
# EMA_5.5_Days_ts$jit = jitter(EMA_5.5_Days_ts$Interval, amount = .09) #already created above
x_tick_means = c(.87, 2.13)
Pre_Post_Box_Violin_Mean_CI = ggplot(data = EMA_5.5_Days_ts, aes(y = Mean)) +
geom_point(data = EMA_5.5_Days_ts %>% filter(Interval == "1"), aes(x = jit), color = "dodgerblue", size = 1,
alpha = .6) +
geom_point(data = EMA_5.5_Days_ts %>% filter(Interval == "2"), aes(x = jit), color = "darkorange", size = 1,
alpha = .6) +
geom_line(aes(x = jit, group = ID), color = "lightgray", alpha = .05) +
geom_half_boxplot(
data = EMA_5.5_Days_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = -.28),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = FALSE, width = .2,
fill = "dodgerblue") +
geom_half_boxplot(
data = EMA_5.5_Days_ts %>% filter(Interval == "2"), aes(x = Interval, y = Mean), position = position_nudge(x = .18),
side = "r", outlier.shape = NA, center = TRUE, errorbar.draw = FALSE, width = .2,
fill = "darkorange") +
geom_half_violin(
data = EMA_5.5_Days_ts %>% filter(Interval == "1"), aes(x = Interval, y = Mean), position = position_nudge(x = -.3),
side = "l", fill = "dodgerblue") +
geom_half_violin(
data = EMA_5.5_Days_ts %>% filter(Interval == "2"),aes(x = Interval, y = Mean), position = position_nudge(x = .3),
side = "r", fill = "darkorange") +
geom_point(data = EMA_5.5_Days_ts %>% filter(Interval == "1"), aes(x = Interval, y = score_mean[1]),
position = position_nudge(x = -.13), color = "dodgerblue", alpha = .6, size = 1.5) +
geom_errorbar(data = EMA_5.5_Days_ts %>% filter(Interval == "1"), aes(x = Interval, y = score_mean[1],
ymin = score_mean[1]-ci[1], ymax = score_mean[1]+ci[1]),
position = position_nudge(-.13), color = "dodgerblue", width = 0.05, size = 0.4, alpha = .6) +
geom_point(data = EMA_5.5_Days_ts %>% filter(Interval == "2"), aes(x = Interval, y = score_mean[2]),
position = position_nudge(x = .13), color = "darkorange", alpha = .6, size = 1.5)+
geom_errorbar(data = EMA_5.5_Days_ts %>% filter(Interval == "2"), aes(x = Interval, y = score_mean[2],
ymin = score_mean[2]-ci[2], ymax = score_mean[2]+ci[2]),
position = position_nudge(.13), color = "darkorange", width = 0.05, size = 0.4, alpha = .6) +
geom_line(data = summary_df, aes(x = x_tick_means, y = score_mean), color = "gray", size = 1) +
scale_x_continuous(breaks = c(1,2), labels = c("PRE", "POST"), limits = c(0, 3)) +
xlab("Interval") + ylab("PHQ-9 Mean Score") +
#ggtitle("EMA Data (5+5 Timepoint Random Days): Individual Pre-Post Means") +
#theme_classic() +
theme_bw() +
coord_cartesian(ylim = c(0, 24))
ggsave("Time Series Dataframes/k20_EMA_5.5_Days_n100_Pre-Post_Box_Violin_Mean+CI.jpg", plot = Pre_Post_Box_Violin_Mean_CI, width = 6, height = 4)
save(Pre_Post_Box_Violin_Mean_CI, file = "Time Series Dataframes/k20_EMA_5.5_n100_Days_Pre_Post_Box_Violin_Mean_CI.RData")#knitr::include_graphics("Time Series Dataframes/k20_EMA_5.5_Days_n100_Pre-Post_Box_Violin.jpg")
knitr::include_graphics("Time Series Dataframes/k20_EMA_5.5_Days_n100_Pre-Post_Box_Violin_Mean+CI.jpg")tibble(Descriptives = c("mean_PRE_Mean","mean_POST_Mean","mean_MeanDiff","mean_ind.pretestSD","mean_ind.posttestSD"),
EMA_5.5 = round(c(mean(EMA_5.5$PRE_Mean),mean(EMA_5.5$POST_Mean),mean(EMA_5.5$MeanDiff),
mean(EMA_5.5$ind.pretestSD),mean(EMA_5.5$ind.posttestSD)), digits = 3),
EMA_30.30 = round(c(mean(EMA_30.30$PRE_Mean),mean(EMA_30.30$POST_Mean),mean(EMA_30.30$MeanDiff),
mean(EMA_30.30$ind.pretestSD),mean(EMA_30.30$ind.posttestSD)), digits = 3),
EMA_5.5_Window = round(c(mean(EMA_5.5_Window$PRE_Mean),mean(EMA_5.5_Window$POST_Mean),
mean(EMA_5.5_Window$MeanDiff),mean(EMA_5.5_Window$ind.pretestSD),
mean(EMA_5.5_Window$ind.posttestSD)), digits = 3),
EMA_5.5_Days = round(c(mean(EMA_5.5_Days$PRE_Mean),mean(EMA_5.5_Days$POST_Mean),mean(EMA_5.5_Days$MeanDiff),
mean(EMA_5.5_Days$ind.pretestSD),mean(EMA_5.5_Days$ind.posttestSD)), digits = 3)) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| Descriptives | EMA_5.5 | EMA_30.30 | EMA_5.5_Window | EMA_5.5_Days |
|---|---|---|---|---|
| mean_PRE_Mean | 10.558 | 10.558 | 10.534 | 10.426 |
| mean_POST_Mean | 7.444 | 7.444 | 7.542 | 7.208 |
| mean_MeanDiff | 3.114 | 3.114 | 2.992 | 3.218 |
| mean_ind.pretestSD | 2.625 | 2.388 | 2.443 | 2.239 |
| mean_ind.posttestSD | 3.588 | 3.264 | 3.327 | 3.195 |
Boxplots der Pre- und Post-Mittelwerte
# Boxplots zum Vergleich
temp = tibble(Scores = c(EMA_5.5$PRE_Mean, EMA_30.30$PRE_Mean, EMA_5.5_Window$PRE_Mean, EMA_5.5_Days$PRE_Mean),
Datasets = rep(c("EMA_5.5", "EMA_30.30", "EMA_5.5_Window", "EMA_5.5_Days"), each =
length(EMA_5.5$PRE_Mean)))
ggplot(temp, aes(x = Datasets, y = Scores)) +
geom_boxplot() +
ylim(0, 27) +
ggtitle("PHQ-9 PRE-Mean") +
xlab("Dataset") +
ylab("PHQ-9 Scores")temp = tibble(Scores = c(EMA_5.5$POST_Mean, EMA_30.30$POST_Mean, EMA_5.5_Window$POST_Mean,
EMA_5.5_Days$POST_Mean), Datasets = rep(c("EMA_5.5", "EMA_30.30", "EMA_5.5_Window",
"EMA_5.5_Days"), each = length(EMA_5.5$POST_Mean)))
ggplot(temp, aes(x = Datasets, y = Scores)) +
geom_boxplot() +
ylim(0, 27) +
ggtitle("PHQ-9 POST-Mean") +
xlab("Dataset") +
ylab("PHQ-9 Scores")Prozentuale Überlappung der Pre-Mittelwerte
# Overlap-Plots zum Vergleich
final.plot(list(EMA_5.5_PRE_Mean = EMA_5.5$PRE_Mean, EMA_30.30_PRE_Mean = EMA_30.30$PRE_Mean),
overlap(list(EMA_5.5_PRE_Mean = EMA_5.5$PRE_Mean, EMA_30.30_PRE_Mean = EMA_30.30$PRE_Mean))$OV)
final.plot(list(EMA_5.5_PRE_Mean = EMA_5.5$PRE_Mean, EMA_5.5_Window_PRE_Mean = EMA_5.5_Window$PRE_Mean),
overlap(list(EMA_5.5_PRE_Mean = EMA_5.5$PRE_Mean, EMA_5.5_Window_PRE_Mean =
EMA_5.5_Window$PRE_Mean))$OV)
final.plot(list(EMA_5.5_PRE_Mean = EMA_5.5$PRE_Mean, EMA_5.5_Days_PRE_Mean = EMA_5.5_Days$PRE_Mean),
overlap(list(EMA_5.5_PRE_Mean = EMA_5.5$PRE_Mean, EMA_5.5_Days_PRE_Mean =
EMA_5.5_Days$PRE_Mean))$OV)Prozentuale Überlappung der Post-Mittelwerte
# Overlap-Plots zum Vergleich
final.plot(list(EMA_5.5_POST_Mean = EMA_5.5$POST_Mean, EMA_30MZP_POST_Mean = EMA_30.30$POST_Mean),
overlap(list(EMA_5.5_POST_Mean = EMA_5.5$POST_Mean, EMA_30MZP_POST_Mean =
EMA_30.30$POST_Mean))$OV)
final.plot(list(EMA_5.5_POST_Mean = EMA_5.5$POST_Mean, EMA_Window_POST_Mean = EMA_5.5_Window$POST_Mean),
overlap(list(EMA_5.5_POST_Mean = EMA_5.5$POST_Mean, EMA_Window_POST_Mean =
EMA_5.5_Window$POST_Mean))$OV)
final.plot(list(EMA_5.5_POST_Mean = EMA_5.5$POST_Mean, EMA_Days_POST_Mean = EMA_5.5_Days$POST_Mean),
overlap(list(EMA_5.5_POST_Mean = EMA_5.5$POST_Mean, EMA_Days_POST_Mean = EMA_5.5_Days$POST_Mean))$OV)# Korrelationsmatrix von PRE- und POST-MZP:
EMA_5.5_KorMat = cor(EMA_5.5[, c(pre_5mzp, post_5mzp)]) %>%
round(., digits = 2)
# durchschnittliche paarweise Korrelation zwischen aufeinanderfolgenden MZP (beachte: ohne Fisher-Z-Transformation):
pre_inter_item_rtt = 0L
for (i in 1:4) {
pre_inter_item_rtt = pre_inter_item_rtt + FisherZ(EMA_5.5_KorMat[i,i+1])
}
pre_inter_item_rtt = FisherZInv(pre_inter_item_rtt / 4)
post_inter_item_rtt = 0L
for (i in 5:9) {
post_inter_item_rtt = post_inter_item_rtt + FisherZ(EMA_5.5_KorMat[i,i+1])
}
post_inter_item_rtt = FisherZInv(post_inter_item_rtt / 4)
for (i in 1:9) {
EMA_5.5_KorMat[i, i+1] = cell_spec(EMA_5.5_KorMat[i, i+1], "html", bold = TRUE)
}
rownames(EMA_5.5_KorMat) = cell_spec(rownames(EMA_5.5_KorMat), "html", bold = TRUE)
EMA_5.5_KorMat %>%
kable(., format = "html", escape = FALSE) %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"),
full_width = FALSE, fixed_thead = T)| PRE1_1 | PRE1_2 | PRE1_3 | PRE1_4 | PRE1_5 | POST1_1 | POST1_2 | POST1_3 | POST1_4 | POST1_5 | |
|---|---|---|---|---|---|---|---|---|---|---|
| PRE1_1 | 1 | 0.46 | 0.23 | -0.03 | -0.04 | 0.13 | -0.02 | -0.13 | -0.1 | 0.04 |
| PRE1_2 | 0.46 | 1 | 0.49 | 0.26 | 0.24 | -0.07 | -0.01 | -0.02 | -0.13 | -0.01 |
| PRE1_3 | 0.23 | 0.49 | 1 | 0.28 | 0.05 | -0.2 | -0.08 | -0.09 | -0.02 | 0.06 |
| PRE1_4 | -0.03 | 0.26 | 0.28 | 1 | 0.28 | -0.08 | -0.04 | 0.06 | 0.14 | 0.17 |
| PRE1_5 | -0.04 | 0.24 | 0.05 | 0.28 | 1 | -0.11 | -0.13 | 0.06 | 0.12 | 0.12 |
| POST1_1 | 0.13 | -0.07 | -0.2 | -0.08 | -0.11 | 1 | 0.5 | 0.21 | -0.1 | -0.05 |
| POST1_2 | -0.02 | -0.01 | -0.08 | -0.04 | -0.13 | 0.5 | 1 | 0.37 | 0.09 | -0.11 |
| POST1_3 | -0.13 | -0.02 | -0.09 | 0.06 | 0.06 | 0.21 | 0.37 | 1 | 0.34 | -0.05 |
| POST1_4 | -0.1 | -0.13 | -0.02 | 0.14 | 0.12 | -0.1 | 0.09 | 0.34 | 1 | 0.26 |
| POST1_5 | 0.04 | -0.01 | 0.06 | 0.17 | 0.12 | -0.05 | -0.11 | -0.05 | 0.26 | 1 |
# mittleres Cronbach´s Alpha zwischen Pre-MZP und Post-MZP:
PRE_alpha = CronbachAlpha(EMA_5.5[pre_5mzp])
POST_alpha = CronbachAlpha(EMA_5.5[post_5mzp])
EMA_5.5_Alpha = FisherZInv(mean(c(FisherZ(PRE_alpha), FisherZ(POST_alpha))))Korrelation zwischen den Pre- und Post-Intervall-Mittelwerten = -0.046.
Durchschnittliche paarweise Korrelation zwischen aufeinanderfolgenden Pre-MZP (Fisher-Z-transformiert): r = 0.38.
Durchschnittliche paarweise Korrelation zwischen aufeinanderfolgenden Post-MZP (Fisher-Z-transformiert): r = 0.35.
Mittleres Cronbach´s Alpha zwischen Pre-MZP und Post-MZP = 0.539.
# Korrelationsmatrix von PRE- und POST-MZP:
EMA_30.30_KorMat = cor(EMA_30.30[, c(pre_30mzp, post_30mzp)]) %>%
round(., digits = 2)
# durchschnittliche paarweise Korrelation zwischen aufeinanderfolgenden MZP (beachte: ohne Fisher-Z-Transformation):
pre_inter_item_rtt = 0L
for (i in 1:29) {
pre_inter_item_rtt = pre_inter_item_rtt + FisherZ(EMA_30.30_KorMat[i,i+1])
}
pre_inter_item_rtt = FisherZInv(pre_inter_item_rtt / 29)
post_inter_item_rtt = 0L
for (i in 31:59) {
post_inter_item_rtt = post_inter_item_rtt + FisherZ(EMA_30.30_KorMat[i,i+1])
}
post_inter_item_rtt = FisherZInv(post_inter_item_rtt / 29)
for (i in 1:59) {
EMA_30.30_KorMat[i, i+1] = cell_spec(EMA_30.30_KorMat[i, i+1], "html", bold = TRUE)
}
rownames(EMA_30.30_KorMat) = cell_spec(rownames(EMA_30.30_KorMat), "html", bold = TRUE)
EMA_30.30_KorMat %>%
kable(., format = "html", escape = FALSE) %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"),
full_width = FALSE, fixed_thead = T) %>%
scroll_box(height = "800px")| PRE1_1 | PRE1_2 | PRE1_3 | PRE1_4 | PRE1_5 | PRE1_6 | PRE1_7 | PRE1_8 | PRE1_9 | PRE1_10 | PRE1_11 | PRE1_12 | PRE1_13 | PRE1_14 | PRE1_15 | PRE1_16 | PRE1_17 | PRE1_18 | PRE1_19 | PRE1_20 | PRE1_21 | PRE1_22 | PRE1_23 | PRE1_24 | PRE1_25 | PRE1_26 | PRE1_27 | PRE1_28 | PRE1_29 | PRE1_30 | POST1_1 | POST1_2 | POST1_3 | POST1_4 | POST1_5 | POST1_6 | POST1_7 | POST1_8 | POST1_9 | POST1_10 | POST1_11 | POST1_12 | POST1_13 | POST1_14 | POST1_15 | POST1_16 | POST1_17 | POST1_18 | POST1_19 | POST1_20 | POST1_21 | POST1_22 | POST1_23 | POST1_24 | POST1_25 | POST1_26 | POST1_27 | POST1_28 | POST1_29 | POST1_30 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PRE1_1 | 1 | 0.46 | 0.23 | -0.03 | -0.04 | 0.3 | 0.36 | 0.38 | 0.34 | 0.25 | 0.39 | 0.38 | 0.42 | 0.21 | 0.23 | 0.38 | 0.34 | 0.31 | 0.35 | 0.25 | 0.27 | 0.19 | 0.35 | 0.42 | 0.37 | 0.2 | 0.4 | 0.37 | 0.35 | 0.32 | 0.13 | -0.02 | -0.13 | -0.1 | 0.04 | 0.02 | 0.09 | -0.12 | -0.01 | -0.04 | -0.07 | 0.1 | -0.1 | -0.01 | 0.01 | -0.14 | -0.09 | -0.02 | 0.02 | 0.17 | 0.03 | -0.06 | -0.01 | -0.03 | 0 | -0.1 | 0.01 | -0.04 | -0.01 | 0.05 |
| PRE1_2 | 0.46 | 1 | 0.49 | 0.26 | 0.24 | 0.51 | 0.55 | 0.63 | 0.49 | 0.34 | 0.61 | 0.54 | 0.52 | 0.48 | 0.37 | 0.58 | 0.48 | 0.48 | 0.68 | 0.31 | 0.41 | 0.47 | 0.64 | 0.56 | 0.41 | 0.38 | 0.52 | 0.63 | 0.58 | 0.44 | -0.07 | -0.01 | -0.02 | -0.13 | -0.01 | -0.11 | -0.06 | 0.07 | -0.13 | 0 | -0.05 | -0.02 | -0.16 | -0.03 | 0.04 | -0.14 | -0.09 | -0.1 | 0.02 | 0.07 | 0.03 | -0.06 | -0.26 | 0 | 0.07 | -0.02 | 0.05 | -0.12 | -0.11 | -0.04 |
| PRE1_3 | 0.23 | 0.49 | 1 | 0.28 | 0.05 | 0.46 | 0.62 | 0.46 | 0.32 | 0.26 | 0.54 | 0.46 | 0.39 | 0.47 | 0.26 | 0.38 | 0.41 | 0.6 | 0.38 | 0.34 | 0.46 | 0.42 | 0.42 | 0.46 | 0.36 | 0.42 | 0.43 | 0.39 | 0.44 | 0.44 | -0.2 | -0.08 | -0.09 | -0.02 | 0.06 | -0.08 | -0.02 | -0.01 | -0.21 | -0.01 | -0.06 | 0 | -0.17 | -0.08 | -0.04 | -0.08 | -0.08 | 0.01 | -0.16 | -0.02 | -0.03 | -0.19 | -0.25 | 0.05 | 0.08 | 0.01 | -0.09 | -0.24 | 0.03 | -0.05 |
| PRE1_4 | -0.03 | 0.26 | 0.28 | 1 | 0.28 | 0.25 | 0.42 | 0.35 | 0.38 | 0.44 | 0.19 | 0.34 | 0.47 | 0.42 | 0.39 | 0.13 | 0.43 | 0.43 | 0.46 | 0.37 | 0.4 | 0.49 | 0.39 | 0.27 | 0.27 | 0.44 | 0.26 | 0.42 | 0.41 | 0.28 | -0.08 | -0.04 | 0.06 | 0.14 | 0.17 | 0.05 | 0.08 | 0.02 | 0.04 | 0.05 | 0.04 | 0.07 | 0.1 | -0.04 | 0.07 | 0.03 | 0.1 | 0.14 | -0.02 | -0.01 | 0.18 | 0.03 | 0.02 | -0.07 | 0.06 | 0.02 | 0.02 | -0.04 | 0.02 | 0.21 |
| PRE1_5 | -0.04 | 0.24 | 0.05 | 0.28 | 1 | 0.34 | 0.28 | 0.35 | 0.25 | 0.25 | 0.16 | 0.24 | 0.3 | 0.41 | 0.35 | 0.24 | 0.38 | 0.33 | 0.36 | 0.15 | 0.3 | 0.35 | 0.34 | 0.23 | 0.26 | 0.3 | 0.27 | 0.33 | 0.27 | 0.3 | -0.11 | -0.13 | 0.06 | 0.12 | 0.12 | 0.04 | -0.07 | -0.08 | 0.03 | 0.09 | -0.1 | -0.1 | -0.06 | 0.18 | 0.09 | -0.12 | 0.01 | -0.08 | 0.03 | 0.17 | 0.03 | 0.01 | 0.03 | -0.08 | 0.02 | 0.04 | -0.06 | 0.06 | -0.09 | 0.07 |
| PRE1_6 | 0.3 | 0.51 | 0.46 | 0.25 | 0.34 | 1 | 0.52 | 0.37 | 0.05 | -0.09 | 0.33 | 0.42 | 0.5 | 0.39 | 0.22 | 0.38 | 0.34 | 0.43 | 0.44 | 0.29 | 0.38 | 0.35 | 0.31 | 0.49 | 0.34 | 0.3 | 0.4 | 0.3 | 0.44 | 0.45 | -0.14 | -0.06 | -0.03 | -0.06 | 0.02 | -0.17 | -0.12 | -0.03 | -0.03 | 0.08 | -0.1 | -0.07 | -0.13 | -0.02 | 0.03 | -0.18 | -0.06 | -0.04 | -0.1 | 0.12 | 0.06 | -0.04 | -0.26 | -0.08 | 0.03 | -0.08 | -0.1 | -0.11 | 0.05 | -0.03 |
| PRE1_7 | 0.36 | 0.55 | 0.62 | 0.42 | 0.28 | 0.52 | 1 | 0.45 | 0.12 | 0.18 | 0.44 | 0.43 | 0.47 | 0.53 | 0.4 | 0.47 | 0.47 | 0.58 | 0.49 | 0.26 | 0.43 | 0.44 | 0.44 | 0.48 | 0.49 | 0.44 | 0.45 | 0.54 | 0.46 | 0.4 | -0.13 | -0.09 | -0.04 | 0.03 | 0.1 | -0.02 | 0 | -0.11 | -0.07 | 0.05 | -0.13 | -0.03 | -0.1 | -0.01 | 0.1 | -0.16 | -0.09 | -0.04 | -0.01 | 0.15 | 0.12 | -0.08 | -0.07 | -0.08 | -0.05 | -0.03 | -0.11 | -0.1 | 0.06 | 0.02 |
| PRE1_8 | 0.38 | 0.63 | 0.46 | 0.35 | 0.35 | 0.37 | 0.45 | 1 | 0.24 | 0.07 | 0.44 | 0.59 | 0.5 | 0.4 | 0.26 | 0.43 | 0.42 | 0.47 | 0.47 | 0.41 | 0.34 | 0.43 | 0.53 | 0.45 | 0.43 | 0.42 | 0.46 | 0.54 | 0.49 | 0.3 | -0.06 | -0.08 | -0.07 | -0.03 | 0.08 | 0 | 0 | -0.04 | -0.15 | 0.02 | -0.05 | -0.07 | -0.09 | 0.01 | 0.03 | -0.1 | -0.06 | 0.04 | -0.08 | 0.04 | -0.07 | -0.09 | -0.11 | -0.11 | 0.2 | -0.04 | -0.03 | -0.13 | 0.02 | 0.01 |
| PRE1_9 | 0.34 | 0.49 | 0.32 | 0.38 | 0.25 | 0.05 | 0.12 | 0.24 | 1 | 0.47 | 0.39 | 0.37 | 0.3 | 0.38 | 0.36 | 0.26 | 0.46 | 0.26 | 0.43 | 0.38 | 0.33 | 0.52 | 0.41 | 0.3 | 0.23 | 0.19 | 0.35 | 0.49 | 0.45 | 0.35 | -0.04 | -0.03 | 0.02 | 0.07 | 0.06 | 0.09 | 0.04 | -0.02 | -0.06 | 0.01 | 0.02 | 0.14 | -0.08 | -0.02 | 0.02 | -0.08 | 0.02 | 0.03 | 0.05 | 0.06 | 0.03 | -0.08 | -0.05 | 0.1 | 0.07 | 0.04 | 0.11 | -0.02 | -0.23 | 0.15 |
| PRE1_10 | 0.25 | 0.34 | 0.26 | 0.44 | 0.25 | -0.09 | 0.18 | 0.07 | 0.47 | 1 | 0.34 | 0.18 | 0.34 | 0.31 | 0.4 | 0.18 | 0.39 | 0.45 | 0.42 | 0.11 | 0.4 | 0.23 | 0.49 | 0.25 | 0.17 | 0.4 | 0.26 | 0.3 | 0.25 | 0.32 | 0.03 | 0 | 0.02 | 0.01 | 0.12 | 0.03 | 0.12 | 0.1 | 0.01 | -0.09 | 0.03 | 0.1 | 0 | 0.04 | -0.01 | 0.08 | 0.06 | -0.03 | 0.04 | 0 | 0.11 | 0.01 | 0 | 0.07 | -0.03 | 0.09 | 0.09 | -0.04 | -0.08 | 0.1 |
| PRE1_11 | 0.39 | 0.61 | 0.54 | 0.19 | 0.16 | 0.33 | 0.44 | 0.44 | 0.39 | 0.34 | 1 | 0.49 | 0.31 | 0.17 | 0.03 | 0.4 | 0.32 | 0.36 | 0.51 | 0.34 | 0.45 | 0.33 | 0.4 | 0.45 | 0.29 | 0.15 | 0.33 | 0.46 | 0.62 | 0.42 | 0 | -0.04 | -0.04 | 0.03 | 0.18 | -0.11 | 0.1 | 0.09 | -0.03 | 0.08 | 0.15 | 0.1 | -0.06 | -0.08 | 0.03 | -0.03 | 0.03 | 0.05 | 0.07 | 0 | 0 | -0.04 | -0.07 | 0.08 | 0.15 | -0.01 | 0.11 | -0.11 | 0 | 0.12 |
| PRE1_12 | 0.38 | 0.54 | 0.46 | 0.34 | 0.24 | 0.42 | 0.43 | 0.59 | 0.37 | 0.18 | 0.49 | 1 | 0.41 | 0.07 | 0.05 | 0.45 | 0.44 | 0.34 | 0.42 | 0.36 | 0.26 | 0.43 | 0.55 | 0.4 | 0.34 | 0.23 | 0.52 | 0.52 | 0.39 | 0.39 | -0.05 | -0.09 | -0.13 | -0.04 | 0.11 | -0.12 | 0.07 | -0.13 | -0.13 | 0.1 | -0.09 | 0.02 | -0.14 | -0.05 | 0.04 | -0.14 | -0.05 | 0 | -0.05 | 0.04 | 0.04 | -0.13 | -0.2 | -0.03 | 0.11 | -0.13 | -0.04 | -0.07 | -0.08 | 0.1 |
| PRE1_13 | 0.42 | 0.52 | 0.39 | 0.47 | 0.3 | 0.5 | 0.47 | 0.5 | 0.3 | 0.34 | 0.31 | 0.41 | 1 | 0.29 | 0.08 | 0.19 | 0.46 | 0.55 | 0.51 | 0.39 | 0.26 | 0.32 | 0.62 | 0.52 | 0.37 | 0.38 | 0.37 | 0.49 | 0.52 | 0.38 | -0.07 | -0.07 | -0.15 | -0.13 | -0.01 | -0.19 | -0.12 | -0.03 | -0.07 | -0.03 | 0 | -0.1 | -0.14 | -0.06 | -0.14 | -0.12 | -0.1 | -0.12 | -0.13 | 0.03 | 0.03 | -0.12 | -0.21 | -0.09 | -0.06 | -0.11 | -0.11 | -0.16 | -0.02 | -0.04 |
| PRE1_14 | 0.21 | 0.48 | 0.47 | 0.42 | 0.41 | 0.39 | 0.53 | 0.4 | 0.38 | 0.31 | 0.17 | 0.07 | 0.29 | 1 | 0.43 | 0.37 | 0.44 | 0.53 | 0.4 | 0.25 | 0.46 | 0.47 | 0.31 | 0.43 | 0.34 | 0.54 | 0.31 | 0.38 | 0.42 | 0.34 | -0.14 | -0.03 | 0.06 | 0.09 | 0.1 | 0.18 | -0.05 | 0.01 | -0.06 | -0.02 | -0.15 | 0.06 | -0.02 | 0.06 | 0.11 | -0.05 | 0.08 | 0 | -0.08 | 0.12 | 0.12 | 0.01 | -0.06 | -0.11 | 0.09 | 0.09 | -0.04 | 0 | -0.01 | 0.03 |
| PRE1_15 | 0.23 | 0.37 | 0.26 | 0.39 | 0.35 | 0.22 | 0.4 | 0.26 | 0.36 | 0.4 | 0.03 | 0.05 | 0.08 | 0.43 | 1 | 0.32 | 0.38 | 0.38 | 0.41 | 0.1 | 0.45 | 0.39 | 0.29 | 0.17 | 0.31 | 0.43 | 0.38 | 0.33 | 0.16 | 0.28 | -0.07 | -0.04 | 0.13 | 0.07 | 0.01 | 0.13 | 0.05 | -0.04 | -0.01 | -0.04 | -0.12 | -0.02 | -0.05 | 0.14 | 0.13 | -0.1 | -0.1 | 0.04 | 0.09 | 0.18 | 0.04 | 0 | 0.04 | 0.04 | -0.03 | 0.12 | 0.04 | -0.06 | -0.05 | 0.04 |
| PRE1_16 | 0.38 | 0.58 | 0.38 | 0.13 | 0.24 | 0.38 | 0.47 | 0.43 | 0.26 | 0.18 | 0.4 | 0.45 | 0.19 | 0.37 | 0.32 | 1 | 0.43 | 0.3 | 0.21 | -0.18 | 0.34 | 0.36 | 0.45 | 0.32 | 0.24 | 0.25 | 0.49 | 0.41 | 0.28 | 0.33 | -0.07 | 0 | 0.03 | 0.06 | 0.05 | 0.1 | 0.07 | -0.07 | -0.07 | 0.03 | -0.2 | 0.02 | -0.04 | 0.01 | 0.26 | -0.11 | -0.07 | -0.03 | 0.05 | 0.24 | 0.08 | -0.04 | -0.11 | 0.05 | 0.08 | 0.13 | -0.05 | -0.06 | 0.04 | 0 |
| PRE1_17 | 0.34 | 0.48 | 0.41 | 0.43 | 0.38 | 0.34 | 0.47 | 0.42 | 0.46 | 0.39 | 0.32 | 0.44 | 0.46 | 0.44 | 0.38 | 0.43 | 1 | 0.39 | 0.26 | -0.02 | 0.31 | 0.53 | 0.56 | 0.3 | 0.34 | 0.56 | 0.53 | 0.46 | 0.28 | 0.22 | -0.14 | -0.11 | -0.25 | -0.13 | 0.07 | -0.12 | -0.13 | -0.12 | -0.07 | -0.13 | -0.19 | -0.09 | -0.31 | -0.12 | 0.14 | -0.16 | -0.18 | -0.26 | -0.07 | 0.09 | 0.01 | -0.22 | -0.11 | -0.14 | -0.12 | -0.17 | -0.17 | -0.15 | -0.12 | 0.03 |
| PRE1_18 | 0.31 | 0.48 | 0.6 | 0.43 | 0.33 | 0.43 | 0.58 | 0.47 | 0.26 | 0.45 | 0.36 | 0.34 | 0.55 | 0.53 | 0.38 | 0.3 | 0.39 | 1 | 0.31 | 0.16 | 0.43 | 0.31 | 0.46 | 0.51 | 0.47 | 0.49 | 0.37 | 0.39 | 0.45 | 0.47 | -0.12 | -0.04 | 0.06 | -0.01 | 0.07 | 0.02 | -0.02 | 0.02 | -0.03 | -0.05 | -0.02 | 0.13 | 0.01 | -0.07 | -0.11 | -0.09 | 0.05 | 0.03 | -0.06 | 0.03 | 0.06 | -0.02 | -0.16 | 0 | 0.06 | 0.11 | -0.06 | -0.12 | 0.02 | -0.01 |
| PRE1_19 | 0.35 | 0.68 | 0.38 | 0.46 | 0.36 | 0.44 | 0.49 | 0.47 | 0.43 | 0.42 | 0.51 | 0.42 | 0.51 | 0.4 | 0.41 | 0.21 | 0.26 | 0.31 | 1 | 0.46 | 0.45 | 0.44 | 0.46 | 0.5 | 0.4 | 0.34 | 0.39 | 0.5 | 0.54 | 0.49 | 0.06 | 0.01 | 0.04 | -0.01 | 0.07 | -0.07 | 0.06 | 0.07 | 0 | 0.13 | 0.06 | -0.08 | -0.03 | 0.19 | 0.03 | -0.05 | 0 | 0.09 | 0.05 | 0.09 | 0.05 | 0.06 | -0.08 | 0.02 | 0.11 | -0.05 | 0.14 | 0.02 | -0.06 | 0.11 |
| PRE1_20 | 0.25 | 0.31 | 0.34 | 0.37 | 0.15 | 0.29 | 0.26 | 0.41 | 0.38 | 0.11 | 0.34 | 0.36 | 0.39 | 0.25 | 0.1 | -0.18 | -0.02 | 0.16 | 0.46 | 1 | 0.34 | 0.3 | 0.24 | 0.35 | 0.21 | 0.12 | 0.13 | 0.41 | 0.53 | 0.27 | -0.07 | -0.13 | 0 | 0.11 | 0.13 | -0.02 | 0.07 | 0 | -0.13 | 0.11 | 0.11 | 0.07 | -0.02 | 0.01 | -0.14 | -0.03 | 0.06 | 0.13 | -0.07 | -0.05 | 0.05 | -0.07 | -0.05 | -0.04 | 0.11 | -0.04 | 0.09 | -0.1 | -0.04 | 0.11 |
| PRE1_21 | 0.27 | 0.41 | 0.46 | 0.4 | 0.3 | 0.38 | 0.43 | 0.34 | 0.33 | 0.4 | 0.45 | 0.26 | 0.26 | 0.46 | 0.45 | 0.34 | 0.31 | 0.43 | 0.45 | 0.34 | 1 | 0.36 | 0.2 | 0.24 | 0.12 | 0.41 | 0.37 | 0.24 | 0.43 | 0.41 | -0.1 | 0.01 | 0.04 | -0.02 | 0.07 | 0.09 | 0.02 | 0.01 | -0.08 | -0.03 | -0.13 | 0.15 | -0.03 | 0.04 | -0.03 | -0.2 | 0.03 | 0.04 | 0.08 | 0.07 | 0.04 | 0.01 | -0.04 | 0 | -0.01 | 0.07 | -0.07 | -0.06 | -0.02 | 0.09 |
| PRE1_22 | 0.19 | 0.47 | 0.42 | 0.49 | 0.35 | 0.35 | 0.44 | 0.43 | 0.52 | 0.23 | 0.33 | 0.43 | 0.32 | 0.47 | 0.39 | 0.36 | 0.53 | 0.31 | 0.44 | 0.3 | 0.36 | 1 | 0.4 | 0.08 | 0.11 | 0.39 | 0.43 | 0.46 | 0.38 | 0.29 | -0.04 | -0.05 | 0 | 0 | 0.09 | 0.09 | -0.07 | 0.07 | -0.07 | -0.04 | -0.03 | 0.02 | -0.17 | 0.02 | 0.16 | -0.01 | -0.04 | -0.03 | -0.03 | 0.11 | 0.15 | -0.06 | -0.02 | -0.09 | 0 | -0.06 | 0.04 | 0.04 | -0.14 | 0.11 |
| PRE1_23 | 0.35 | 0.64 | 0.42 | 0.39 | 0.34 | 0.31 | 0.44 | 0.53 | 0.41 | 0.49 | 0.4 | 0.55 | 0.62 | 0.31 | 0.29 | 0.45 | 0.56 | 0.46 | 0.46 | 0.24 | 0.2 | 0.4 | 1 | 0.33 | 0.16 | 0.4 | 0.44 | 0.53 | 0.36 | 0.44 | -0.1 | 0.01 | -0.01 | 0.02 | -0.03 | -0.03 | 0.11 | 0.06 | -0.2 | -0.04 | -0.06 | -0.06 | -0.16 | 0.06 | 0.11 | -0.07 | -0.06 | -0.14 | -0.02 | 0.17 | 0.05 | -0.07 | -0.17 | -0.01 | 0.07 | -0.02 | 0.02 | -0.13 | -0.01 | 0.02 |
| PRE1_24 | 0.42 | 0.56 | 0.46 | 0.27 | 0.23 | 0.49 | 0.48 | 0.45 | 0.3 | 0.25 | 0.45 | 0.4 | 0.52 | 0.43 | 0.17 | 0.32 | 0.3 | 0.51 | 0.5 | 0.35 | 0.24 | 0.08 | 0.33 | 1 | 0.3 | 0.27 | 0.28 | 0.51 | 0.51 | 0.43 | -0.05 | -0.04 | -0.06 | 0.05 | 0.14 | -0.08 | -0.05 | -0.1 | 0.08 | 0.17 | 0.02 | -0.03 | 0.02 | 0.02 | -0.01 | -0.11 | 0.01 | 0.11 | -0.06 | 0.09 | -0.02 | -0.02 | -0.11 | 0.04 | 0.14 | -0.03 | -0.04 | -0.07 | 0.09 | 0.07 |
| PRE1_25 | 0.37 | 0.41 | 0.36 | 0.27 | 0.26 | 0.34 | 0.49 | 0.43 | 0.23 | 0.17 | 0.29 | 0.34 | 0.37 | 0.34 | 0.31 | 0.24 | 0.34 | 0.47 | 0.4 | 0.21 | 0.12 | 0.11 | 0.16 | 0.3 | 1 | 0.28 | 0.39 | 0.39 | 0.42 | 0.21 | -0.05 | -0.21 | -0.08 | -0.05 | 0.11 | -0.16 | 0.01 | -0.14 | -0.03 | 0.02 | -0.03 | -0.01 | -0.06 | -0.13 | -0.07 | -0.07 | -0.08 | 0 | -0.07 | -0.08 | 0.03 | -0.15 | -0.14 | -0.06 | 0.03 | 0.01 | -0.01 | -0.17 | -0.08 | -0.06 |
| PRE1_26 | 0.2 | 0.38 | 0.42 | 0.44 | 0.3 | 0.3 | 0.44 | 0.42 | 0.19 | 0.4 | 0.15 | 0.23 | 0.38 | 0.54 | 0.43 | 0.25 | 0.56 | 0.49 | 0.34 | 0.12 | 0.41 | 0.39 | 0.4 | 0.27 | 0.28 | 1 | 0.32 | 0.14 | 0.12 | 0.08 | -0.04 | 0 | -0.01 | -0.05 | -0.05 | -0.04 | -0.01 | 0.04 | -0.07 | -0.07 | -0.12 | -0.01 | -0.09 | 0.02 | 0.06 | -0.1 | -0.07 | -0.07 | -0.05 | 0.15 | 0.11 | -0.07 | -0.07 | -0.11 | 0 | -0.05 | 0.01 | -0.06 | 0.02 | -0.05 |
| PRE1_27 | 0.4 | 0.52 | 0.43 | 0.26 | 0.27 | 0.4 | 0.45 | 0.46 | 0.35 | 0.26 | 0.33 | 0.52 | 0.37 | 0.31 | 0.38 | 0.49 | 0.53 | 0.37 | 0.39 | 0.13 | 0.37 | 0.43 | 0.44 | 0.28 | 0.39 | 0.32 | 1 | 0.38 | 0.22 | 0.07 | -0.01 | -0.02 | -0.18 | -0.1 | 0.02 | 0.02 | 0 | -0.1 | -0.11 | -0.1 | -0.22 | -0.05 | -0.1 | -0.04 | 0.11 | -0.17 | -0.06 | -0.15 | 0.03 | 0.05 | 0.03 | -0.01 | -0.15 | -0.14 | -0.04 | -0.03 | -0.02 | -0.17 | -0.03 | -0.04 |
| PRE1_28 | 0.37 | 0.63 | 0.39 | 0.42 | 0.33 | 0.3 | 0.54 | 0.54 | 0.49 | 0.3 | 0.46 | 0.52 | 0.49 | 0.38 | 0.33 | 0.41 | 0.46 | 0.39 | 0.5 | 0.41 | 0.24 | 0.46 | 0.53 | 0.51 | 0.39 | 0.14 | 0.38 | 1 | 0.44 | 0.26 | -0.15 | -0.11 | -0.11 | 0.01 | 0.17 | -0.04 | -0.01 | -0.07 | -0.14 | 0.05 | -0.02 | 0.04 | -0.1 | -0.11 | -0.02 | -0.1 | -0.13 | -0.02 | 0.01 | 0.04 | -0.02 | -0.19 | -0.09 | 0.02 | 0.08 | -0.05 | -0.04 | -0.1 | -0.09 | 0.06 |
| PRE1_29 | 0.35 | 0.58 | 0.44 | 0.41 | 0.27 | 0.44 | 0.46 | 0.49 | 0.45 | 0.25 | 0.62 | 0.39 | 0.52 | 0.42 | 0.16 | 0.28 | 0.28 | 0.45 | 0.54 | 0.53 | 0.43 | 0.38 | 0.36 | 0.51 | 0.42 | 0.12 | 0.22 | 0.44 | 1 | 0.38 | -0.1 | -0.14 | 0.12 | 0.14 | 0.15 | -0.05 | 0.04 | 0.01 | 0.06 | 0.09 | 0.09 | 0.1 | 0 | -0.04 | -0.01 | -0.03 | 0.09 | 0.12 | -0.02 | -0.01 | 0.06 | -0.02 | -0.1 | 0.03 | 0.17 | 0.06 | 0.04 | -0.14 | 0 | 0.16 |
| PRE1_30 | 0.32 | 0.44 | 0.44 | 0.28 | 0.3 | 0.45 | 0.4 | 0.3 | 0.35 | 0.32 | 0.42 | 0.39 | 0.38 | 0.34 | 0.28 | 0.33 | 0.22 | 0.47 | 0.49 | 0.27 | 0.41 | 0.29 | 0.44 | 0.43 | 0.21 | 0.08 | 0.07 | 0.26 | 0.38 | 1 | -0.04 | -0.02 | 0.05 | 0.01 | 0.11 | 0.01 | 0.02 | -0.01 | -0.04 | 0.11 | 0.04 | -0.03 | -0.11 | 0.17 | 0.03 | -0.06 | 0.03 | 0.09 | -0.07 | 0.13 | 0.06 | 0.02 | -0.09 | 0.08 | 0.04 | 0.03 | -0.04 | 0.05 | -0.06 | 0.12 |
| POST1_1 | 0.13 | -0.07 | -0.2 | -0.08 | -0.11 | -0.14 | -0.13 | -0.06 | -0.04 | 0.03 | 0 | -0.05 | -0.07 | -0.14 | -0.07 | -0.07 | -0.14 | -0.12 | 0.06 | -0.07 | -0.1 | -0.04 | -0.1 | -0.05 | -0.05 | -0.04 | -0.01 | -0.15 | -0.1 | -0.04 | 1 | 0.5 | 0.21 | -0.1 | -0.05 | 0.11 | 0.33 | 0.44 | 0.42 | 0.35 | 0.27 | 0.25 | 0.44 | 0.35 | 0.31 | 0.45 | 0.14 | 0.26 | 0.47 | 0.33 | 0.25 | 0.51 | 0.43 | 0.33 | 0.12 | 0.31 | 0.47 | 0.42 | 0.24 | 0.2 |
| POST1_2 | -0.02 | -0.01 | -0.08 | -0.04 | -0.13 | -0.06 | -0.09 | -0.08 | -0.03 | 0 | -0.04 | -0.09 | -0.07 | -0.03 | -0.04 | 0 | -0.11 | -0.04 | 0.01 | -0.13 | 0.01 | -0.05 | 0.01 | -0.04 | -0.21 | 0 | -0.02 | -0.11 | -0.14 | -0.02 | 0.5 | 1 | 0.37 | 0.09 | -0.11 | 0.25 | 0.46 | 0.55 | 0.34 | 0.36 | 0.44 | 0.43 | 0.38 | 0.37 | 0.33 | 0.35 | 0.37 | 0.22 | 0.52 | 0.49 | 0.34 | 0.54 | 0.41 | 0.34 | 0.32 | 0.35 | 0.44 | 0.53 | 0.4 | 0.25 |
| POST1_3 | -0.13 | -0.02 | -0.09 | 0.06 | 0.06 | -0.03 | -0.04 | -0.07 | 0.02 | 0.02 | -0.04 | -0.13 | -0.15 | 0.06 | 0.13 | 0.03 | -0.25 | 0.06 | 0.04 | 0 | 0.04 | 0 | -0.01 | -0.06 | -0.08 | -0.01 | -0.18 | -0.11 | 0.12 | 0.05 | 0.21 | 0.37 | 1 | 0.34 | -0.05 | 0.45 | 0.29 | 0.42 | 0.31 | 0.39 | 0.21 | 0.47 | 0.52 | 0.34 | 0.32 | 0.46 | 0.37 | 0.36 | 0.43 | 0.27 | 0.2 | 0.51 | 0.32 | 0.46 | 0.4 | 0.43 | 0.51 | 0.31 | 0.33 | 0.31 |
| POST1_4 | -0.1 | -0.13 | -0.02 | 0.14 | 0.12 | -0.06 | 0.03 | -0.03 | 0.07 | 0.01 | 0.03 | -0.04 | -0.13 | 0.09 | 0.07 | 0.06 | -0.13 | -0.01 | -0.01 | 0.11 | -0.02 | 0 | 0.02 | 0.05 | -0.05 | -0.05 | -0.1 | 0.01 | 0.14 | 0.01 | -0.1 | 0.09 | 0.34 | 1 | 0.26 | 0.46 | 0.38 | 0.06 | 0.3 | 0.32 | 0.2 | 0.35 | 0.35 | 0.33 | 0.3 | 0.1 | 0.5 | 0.41 | 0.22 | 0.32 | 0.26 | 0.34 | 0.28 | 0.27 | 0.37 | 0.15 | 0.27 | 0.35 | 0.34 | 0.41 |
| POST1_5 | 0.04 | -0.01 | 0.06 | 0.17 | 0.12 | 0.02 | 0.1 | 0.08 | 0.06 | 0.12 | 0.18 | 0.11 | -0.01 | 0.1 | 0.01 | 0.05 | 0.07 | 0.07 | 0.07 | 0.13 | 0.07 | 0.09 | -0.03 | 0.14 | 0.11 | -0.05 | 0.02 | 0.17 | 0.15 | 0.11 | -0.05 | -0.11 | -0.05 | 0.26 | 1 | 0.3 | 0.27 | 0.07 | 0.16 | 0.13 | 0.24 | 0.25 | 0.09 | 0.22 | 0.14 | 0.19 | 0.3 | 0.26 | 0.13 | 0.07 | 0.43 | 0.13 | 0.16 | 0.11 | 0.1 | 0.18 | 0.09 | 0.17 | 0.18 | 0.32 |
| POST1_6 | 0.02 | -0.11 | -0.08 | 0.05 | 0.04 | -0.17 | -0.02 | 0 | 0.09 | 0.03 | -0.11 | -0.12 | -0.19 | 0.18 | 0.13 | 0.1 | -0.12 | 0.02 | -0.07 | -0.02 | 0.09 | 0.09 | -0.03 | -0.08 | -0.16 | -0.04 | 0.02 | -0.04 | -0.05 | 0.01 | 0.11 | 0.25 | 0.45 | 0.46 | 0.3 | 1 | 0.33 | 0.04 | 0.1 | 0.04 | 0.13 | 0.47 | 0.39 | 0.34 | 0.23 | 0.15 | 0.29 | 0.55 | 0.34 | 0.29 | 0.21 | 0.4 | 0.36 | 0.33 | 0.26 | 0.33 | 0.24 | 0.42 | 0.22 | 0.34 |
| POST1_7 | 0.09 | -0.06 | -0.02 | 0.08 | -0.07 | -0.12 | 0 | 0 | 0.04 | 0.12 | 0.1 | 0.07 | -0.12 | -0.05 | 0.05 | 0.07 | -0.13 | -0.02 | 0.06 | 0.07 | 0.02 | -0.07 | 0.11 | -0.05 | 0.01 | -0.01 | 0 | -0.01 | 0.04 | 0.02 | 0.33 | 0.46 | 0.29 | 0.38 | 0.27 | 0.33 | 1 | 0.28 | 0.1 | 0.08 | 0.2 | 0.39 | 0.3 | 0.48 | 0.37 | 0.29 | 0.27 | 0.34 | 0.41 | 0.45 | 0.39 | 0.31 | 0.33 | 0.33 | 0.38 | 0.43 | 0.42 | 0.23 | 0.42 | 0.26 |
| POST1_8 | -0.12 | 0.07 | -0.01 | 0.02 | -0.08 | -0.03 | -0.11 | -0.04 | -0.02 | 0.1 | 0.09 | -0.13 | -0.03 | 0.01 | -0.04 | -0.07 | -0.12 | 0.02 | 0.07 | 0 | 0.01 | 0.07 | 0.06 | -0.1 | -0.14 | 0.04 | -0.1 | -0.07 | 0.01 | -0.01 | 0.44 | 0.55 | 0.42 | 0.06 | 0.07 | 0.04 | 0.28 | 1 | 0.09 | 0.23 | 0.35 | 0.38 | 0.41 | 0.31 | 0.15 | 0.5 | 0.46 | 0.09 | 0.31 | 0.18 | 0.41 | 0.51 | 0.23 | 0.24 | 0.18 | 0.25 | 0.4 | 0.28 | 0.38 | 0.28 |
| POST1_9 | -0.01 | -0.13 | -0.21 | 0.04 | 0.03 | -0.03 | -0.07 | -0.15 | -0.06 | 0.01 | -0.03 | -0.13 | -0.07 | -0.06 | -0.01 | -0.07 | -0.07 | -0.03 | 0 | -0.13 | -0.08 | -0.07 | -0.2 | 0.08 | -0.03 | -0.07 | -0.11 | -0.14 | 0.06 | -0.04 | 0.42 | 0.34 | 0.31 | 0.3 | 0.16 | 0.1 | 0.1 | 0.09 | 1 | 0.25 | 0.36 | 0.14 | 0.41 | 0.27 | 0.36 | 0.25 | 0.27 | 0.27 | 0.41 | 0.36 | 0.09 | 0.48 | 0.59 | 0.34 | 0.06 | 0.13 | 0.37 | 0.49 | 0.28 | 0.28 |
| POST1_10 | -0.04 | 0 | -0.01 | 0.05 | 0.09 | 0.08 | 0.05 | 0.02 | 0.01 | -0.09 | 0.08 | 0.1 | -0.03 | -0.02 | -0.04 | 0.03 | -0.13 | -0.05 | 0.13 | 0.11 | -0.03 | -0.04 | -0.04 | 0.17 | 0.02 | -0.07 | -0.1 | 0.05 | 0.09 | 0.11 | 0.35 | 0.36 | 0.39 | 0.32 | 0.13 | 0.04 | 0.08 | 0.23 | 0.25 | 1 | 0.34 | 0.39 | 0.3 | 0.24 | 0.31 | 0.4 | 0.38 | 0.21 | 0.34 | 0.24 | 0.38 | 0.35 | 0.1 | 0.28 | 0.46 | 0.29 | 0.39 | 0.38 | 0.22 | 0.3 |
| POST1_11 | -0.07 | -0.05 | -0.06 | 0.04 | -0.1 | -0.1 | -0.13 | -0.05 | 0.02 | 0.03 | 0.15 | -0.09 | 0 | -0.15 | -0.12 | -0.2 | -0.19 | -0.02 | 0.06 | 0.11 | -0.13 | -0.03 | -0.06 | 0.02 | -0.03 | -0.12 | -0.22 | -0.02 | 0.09 | 0.04 | 0.27 | 0.44 | 0.21 | 0.2 | 0.24 | 0.13 | 0.2 | 0.35 | 0.36 | 0.34 | 1 | 0.32 | 0.12 | 0.02 | -0.04 | 0.43 | 0.3 | 0.32 | 0.2 | 0.13 | 0.26 | 0.24 | 0.38 | 0.31 | 0.19 | 0.13 | 0.34 | 0.45 | 0.17 | 0.29 |
| POST1_12 | 0.1 | -0.02 | 0 | 0.07 | -0.1 | -0.07 | -0.03 | -0.07 | 0.14 | 0.1 | 0.1 | 0.02 | -0.1 | 0.06 | -0.02 | 0.02 | -0.09 | 0.13 | -0.08 | 0.07 | 0.15 | 0.02 | -0.06 | -0.03 | -0.01 | -0.01 | -0.05 | 0.04 | 0.1 | -0.03 | 0.25 | 0.43 | 0.47 | 0.35 | 0.25 | 0.47 | 0.39 | 0.38 | 0.14 | 0.39 | 0.32 | 1 | 0.32 | 0.13 | 0.01 | 0.36 | 0.48 | 0.26 | 0.36 | 0.29 | 0.43 | 0.31 | 0.22 | 0.4 | 0.41 | 0.32 | 0.31 | 0.44 | 0.26 | 0.43 |
| POST1_13 | -0.1 | -0.16 | -0.17 | 0.1 | -0.06 | -0.13 | -0.1 | -0.09 | -0.08 | 0 | -0.06 | -0.14 | -0.14 | -0.02 | -0.05 | -0.04 | -0.31 | 0.01 | -0.03 | -0.02 | -0.03 | -0.17 | -0.16 | 0.02 | -0.06 | -0.09 | -0.1 | -0.1 | 0 | -0.11 | 0.44 | 0.38 | 0.52 | 0.35 | 0.09 | 0.39 | 0.3 | 0.41 | 0.41 | 0.3 | 0.12 | 0.32 | 1 | 0.19 | 0.16 | 0.4 | 0.44 | 0.41 | 0.38 | 0.19 | 0.2 | 0.7 | 0.39 | 0.27 | 0.23 | 0.27 | 0.45 | 0.24 | 0.48 | 0.38 |
| POST1_14 | -0.01 | -0.03 | -0.08 | -0.04 | 0.18 | -0.02 | -0.01 | 0.01 | -0.02 | 0.04 | -0.08 | -0.05 | -0.06 | 0.06 | 0.14 | 0.01 | -0.12 | -0.07 | 0.19 | 0.01 | 0.04 | 0.02 | 0.06 | 0.02 | -0.13 | 0.02 | -0.04 | -0.11 | -0.04 | 0.17 | 0.35 | 0.37 | 0.34 | 0.33 | 0.22 | 0.34 | 0.48 | 0.31 | 0.27 | 0.24 | 0.02 | 0.13 | 0.19 | 1 | 0.26 | 0.23 | 0.17 | 0.23 | 0.47 | 0.54 | 0.35 | 0.35 | 0.29 | 0.42 | 0.23 | 0.37 | 0.4 | 0.45 | 0.23 | 0.18 |
| POST1_15 | 0.01 | 0.04 | -0.04 | 0.07 | 0.09 | 0.03 | 0.1 | 0.03 | 0.02 | -0.01 | 0.03 | 0.04 | -0.14 | 0.11 | 0.13 | 0.26 | 0.14 | -0.11 | 0.03 | -0.14 | -0.03 | 0.16 | 0.11 | -0.01 | -0.07 | 0.06 | 0.11 | -0.02 | -0.01 | 0.03 | 0.31 | 0.33 | 0.32 | 0.3 | 0.14 | 0.23 | 0.37 | 0.15 | 0.36 | 0.31 | -0.04 | 0.01 | 0.16 | 0.26 | 1 | 0.16 | 0.27 | 0.27 | 0.38 | 0.34 | 0.22 | 0.46 | 0.35 | 0.13 | 0.25 | 0.33 | 0.31 | 0.24 | 0.35 | 0.19 |
| POST1_16 | -0.14 | -0.14 | -0.08 | 0.03 | -0.12 | -0.18 | -0.16 | -0.1 | -0.08 | 0.08 | -0.03 | -0.14 | -0.12 | -0.05 | -0.1 | -0.11 | -0.16 | -0.09 | -0.05 | -0.03 | -0.2 | -0.01 | -0.07 | -0.11 | -0.07 | -0.1 | -0.17 | -0.1 | -0.03 | -0.06 | 0.45 | 0.35 | 0.46 | 0.1 | 0.19 | 0.15 | 0.29 | 0.5 | 0.25 | 0.4 | 0.43 | 0.36 | 0.4 | 0.23 | 0.16 | 1 | 0.3 | 0.08 | 0.11 | 0.04 | 0.28 | 0.4 | 0.3 | 0.22 | 0.37 | 0.36 | 0.52 | 0.29 | 0.16 | 0.25 |
| POST1_17 | -0.09 | -0.09 | -0.08 | 0.1 | 0.01 | -0.06 | -0.09 | -0.06 | 0.02 | 0.06 | 0.03 | -0.05 | -0.1 | 0.08 | -0.1 | -0.07 | -0.18 | 0.05 | 0 | 0.06 | 0.03 | -0.04 | -0.06 | 0.01 | -0.08 | -0.07 | -0.06 | -0.13 | 0.09 | 0.03 | 0.14 | 0.37 | 0.37 | 0.5 | 0.3 | 0.29 | 0.27 | 0.46 | 0.27 | 0.38 | 0.3 | 0.48 | 0.44 | 0.17 | 0.27 | 0.3 | 1 | 0.2 | 0.06 | 0.04 | 0.35 | 0.57 | 0.28 | 0.06 | 0.36 | 0.22 | 0.21 | 0.3 | 0.37 | 0.56 |
| POST1_18 | -0.02 | -0.1 | 0.01 | 0.14 | -0.08 | -0.04 | -0.04 | 0.04 | 0.03 | -0.03 | 0.05 | 0 | -0.12 | 0 | 0.04 | -0.03 | -0.26 | 0.03 | 0.09 | 0.13 | 0.04 | -0.03 | -0.14 | 0.11 | 0 | -0.07 | -0.15 | -0.02 | 0.12 | 0.09 | 0.26 | 0.22 | 0.36 | 0.41 | 0.26 | 0.55 | 0.34 | 0.09 | 0.27 | 0.21 | 0.32 | 0.26 | 0.41 | 0.23 | 0.27 | 0.08 | 0.2 | 1 | 0.28 | 0.05 | 0.18 | 0.36 | 0.4 | 0.37 | 0.2 | 0.33 | 0.36 | 0.34 | 0.26 | 0.21 |
| POST1_19 | 0.02 | 0.02 | -0.16 | -0.02 | 0.03 | -0.1 | -0.01 | -0.08 | 0.05 | 0.04 | 0.07 | -0.05 | -0.13 | -0.08 | 0.09 | 0.05 | -0.07 | -0.06 | 0.05 | -0.07 | 0.08 | -0.03 | -0.02 | -0.06 | -0.07 | -0.05 | 0.03 | 0.01 | -0.02 | -0.07 | 0.47 | 0.52 | 0.43 | 0.22 | 0.13 | 0.34 | 0.41 | 0.31 | 0.41 | 0.34 | 0.2 | 0.36 | 0.38 | 0.47 | 0.38 | 0.11 | 0.06 | 0.28 | 1 | 0.39 | 0.35 | 0.43 | 0.36 | 0.58 | 0.1 | 0.39 | 0.44 | 0.41 | 0.35 | 0.23 |
| POST1_20 | 0.17 | 0.07 | -0.02 | -0.01 | 0.17 | 0.12 | 0.15 | 0.04 | 0.06 | 0 | 0 | 0.04 | 0.03 | 0.12 | 0.18 | 0.24 | 0.09 | 0.03 | 0.09 | -0.05 | 0.07 | 0.11 | 0.17 | 0.09 | -0.08 | 0.15 | 0.05 | 0.04 | -0.01 | 0.13 | 0.33 | 0.49 | 0.27 | 0.32 | 0.07 | 0.29 | 0.45 | 0.18 | 0.36 | 0.24 | 0.13 | 0.29 | 0.19 | 0.54 | 0.34 | 0.04 | 0.04 | 0.05 | 0.39 | 1 | 0.29 | 0.29 | 0.31 | 0.34 | 0.28 | 0.15 | 0.31 | 0.48 | 0.38 | 0.2 |
| POST1_21 | 0.03 | 0.03 | -0.03 | 0.18 | 0.03 | 0.06 | 0.12 | -0.07 | 0.03 | 0.11 | 0 | 0.04 | 0.03 | 0.12 | 0.04 | 0.08 | 0.01 | 0.06 | 0.05 | 0.05 | 0.04 | 0.15 | 0.05 | -0.02 | 0.03 | 0.11 | 0.03 | -0.02 | 0.06 | 0.06 | 0.25 | 0.34 | 0.2 | 0.26 | 0.43 | 0.21 | 0.39 | 0.41 | 0.09 | 0.38 | 0.26 | 0.43 | 0.2 | 0.35 | 0.22 | 0.28 | 0.35 | 0.18 | 0.35 | 0.29 | 1 | 0.26 | 0.08 | 0.02 | 0.06 | 0.3 | 0.27 | 0.3 | 0.27 | 0.32 |
| POST1_22 | -0.06 | -0.06 | -0.19 | 0.03 | 0.01 | -0.04 | -0.08 | -0.09 | -0.08 | 0.01 | -0.04 | -0.13 | -0.12 | 0.01 | 0 | -0.04 | -0.22 | -0.02 | 0.06 | -0.07 | 0.01 | -0.06 | -0.07 | -0.02 | -0.15 | -0.07 | -0.01 | -0.19 | -0.02 | 0.02 | 0.51 | 0.54 | 0.51 | 0.34 | 0.13 | 0.4 | 0.31 | 0.51 | 0.48 | 0.35 | 0.24 | 0.31 | 0.7 | 0.35 | 0.46 | 0.4 | 0.57 | 0.36 | 0.43 | 0.29 | 0.26 | 1 | 0.43 | 0.18 | 0.17 | 0.4 | 0.49 | 0.4 | 0.41 | 0.37 |
| POST1_23 | -0.01 | -0.26 | -0.25 | 0.02 | 0.03 | -0.26 | -0.07 | -0.11 | -0.05 | 0 | -0.07 | -0.2 | -0.21 | -0.06 | 0.04 | -0.11 | -0.11 | -0.16 | -0.08 | -0.05 | -0.04 | -0.02 | -0.17 | -0.11 | -0.14 | -0.07 | -0.15 | -0.09 | -0.1 | -0.09 | 0.43 | 0.41 | 0.32 | 0.28 | 0.16 | 0.36 | 0.33 | 0.23 | 0.59 | 0.1 | 0.38 | 0.22 | 0.39 | 0.29 | 0.35 | 0.3 | 0.28 | 0.4 | 0.36 | 0.31 | 0.08 | 0.43 | 1 | 0.23 | -0.1 | 0.21 | 0.22 | 0.45 | 0.33 | 0.41 |
| POST1_24 | -0.03 | 0 | 0.05 | -0.07 | -0.08 | -0.08 | -0.08 | -0.11 | 0.1 | 0.07 | 0.08 | -0.03 | -0.09 | -0.11 | 0.04 | 0.05 | -0.14 | 0 | 0.02 | -0.04 | 0 | -0.09 | -0.01 | 0.04 | -0.06 | -0.11 | -0.14 | 0.02 | 0.03 | 0.08 | 0.33 | 0.34 | 0.46 | 0.27 | 0.11 | 0.33 | 0.33 | 0.24 | 0.34 | 0.28 | 0.31 | 0.4 | 0.27 | 0.42 | 0.13 | 0.22 | 0.06 | 0.37 | 0.58 | 0.34 | 0.02 | 0.18 | 0.23 | 1 | 0.17 | 0.26 | 0.4 | 0.4 | 0.23 | 0.24 |
| POST1_25 | 0 | 0.07 | 0.08 | 0.06 | 0.02 | 0.03 | -0.05 | 0.2 | 0.07 | -0.03 | 0.15 | 0.11 | -0.06 | 0.09 | -0.03 | 0.08 | -0.12 | 0.06 | 0.11 | 0.11 | -0.01 | 0 | 0.07 | 0.14 | 0.03 | 0 | -0.04 | 0.08 | 0.17 | 0.04 | 0.12 | 0.32 | 0.4 | 0.37 | 0.1 | 0.26 | 0.38 | 0.18 | 0.06 | 0.46 | 0.19 | 0.41 | 0.23 | 0.23 | 0.25 | 0.37 | 0.36 | 0.2 | 0.1 | 0.28 | 0.06 | 0.17 | -0.1 | 0.17 | 1 | 0.24 | 0.42 | 0.28 | 0.26 | 0.12 |
| POST1_26 | -0.1 | -0.02 | 0.01 | 0.02 | 0.04 | -0.08 | -0.03 | -0.04 | 0.04 | 0.09 | -0.01 | -0.13 | -0.11 | 0.09 | 0.12 | 0.13 | -0.17 | 0.11 | -0.05 | -0.04 | 0.07 | -0.06 | -0.02 | -0.03 | 0.01 | -0.05 | -0.03 | -0.05 | 0.06 | 0.03 | 0.31 | 0.35 | 0.43 | 0.15 | 0.18 | 0.33 | 0.43 | 0.25 | 0.13 | 0.29 | 0.13 | 0.32 | 0.27 | 0.37 | 0.33 | 0.36 | 0.22 | 0.33 | 0.39 | 0.15 | 0.3 | 0.4 | 0.21 | 0.26 | 0.24 | 1 | 0.39 | 0.11 | -0.03 | -0.03 |
| POST1_27 | 0.01 | 0.05 | -0.09 | 0.02 | -0.06 | -0.1 | -0.11 | -0.03 | 0.11 | 0.09 | 0.11 | -0.04 | -0.11 | -0.04 | 0.04 | -0.05 | -0.17 | -0.06 | 0.14 | 0.09 | -0.07 | 0.04 | 0.02 | -0.04 | -0.01 | 0.01 | -0.02 | -0.04 | 0.04 | -0.04 | 0.47 | 0.44 | 0.51 | 0.27 | 0.09 | 0.24 | 0.42 | 0.4 | 0.37 | 0.39 | 0.34 | 0.31 | 0.45 | 0.4 | 0.31 | 0.52 | 0.21 | 0.36 | 0.44 | 0.31 | 0.27 | 0.49 | 0.22 | 0.4 | 0.42 | 0.39 | 1 | 0.38 | 0.09 | -0.03 |
| POST1_28 | -0.04 | -0.12 | -0.24 | -0.04 | 0.06 | -0.11 | -0.1 | -0.13 | -0.02 | -0.04 | -0.11 | -0.07 | -0.16 | 0 | -0.06 | -0.06 | -0.15 | -0.12 | 0.02 | -0.1 | -0.06 | 0.04 | -0.13 | -0.07 | -0.17 | -0.06 | -0.17 | -0.1 | -0.14 | 0.05 | 0.42 | 0.53 | 0.31 | 0.35 | 0.17 | 0.42 | 0.23 | 0.28 | 0.49 | 0.38 | 0.45 | 0.44 | 0.24 | 0.45 | 0.24 | 0.29 | 0.3 | 0.34 | 0.41 | 0.48 | 0.3 | 0.4 | 0.45 | 0.4 | 0.28 | 0.11 | 0.38 | 1 | 0.15 | 0.18 |
| POST1_29 | -0.01 | -0.11 | 0.03 | 0.02 | -0.09 | 0.05 | 0.06 | 0.02 | -0.23 | -0.08 | 0 | -0.08 | -0.02 | -0.01 | -0.05 | 0.04 | -0.12 | 0.02 | -0.06 | -0.04 | -0.02 | -0.14 | -0.01 | 0.09 | -0.08 | 0.02 | -0.03 | -0.09 | 0 | -0.06 | 0.24 | 0.4 | 0.33 | 0.34 | 0.18 | 0.22 | 0.42 | 0.38 | 0.28 | 0.22 | 0.17 | 0.26 | 0.48 | 0.23 | 0.35 | 0.16 | 0.37 | 0.26 | 0.35 | 0.38 | 0.27 | 0.41 | 0.33 | 0.23 | 0.26 | -0.03 | 0.09 | 0.15 | 1 | 0.31 |
| POST1_30 | 0.05 | -0.04 | -0.05 | 0.21 | 0.07 | -0.03 | 0.02 | 0.01 | 0.15 | 0.1 | 0.12 | 0.1 | -0.04 | 0.03 | 0.04 | 0 | 0.03 | -0.01 | 0.11 | 0.11 | 0.09 | 0.11 | 0.02 | 0.07 | -0.06 | -0.05 | -0.04 | 0.06 | 0.16 | 0.12 | 0.2 | 0.25 | 0.31 | 0.41 | 0.32 | 0.34 | 0.26 | 0.28 | 0.28 | 0.3 | 0.29 | 0.43 | 0.38 | 0.18 | 0.19 | 0.25 | 0.56 | 0.21 | 0.23 | 0.2 | 0.32 | 0.37 | 0.41 | 0.24 | 0.12 | -0.03 | -0.03 | 0.18 | 0.31 | 1 |
# mittleres Cronbach´s Alpha zwischen Pre-MZP und Post-MZP:
PRE_alpha = CronbachAlpha(EMA_30.30[pre_30mzp])
POST_alpha = CronbachAlpha(EMA_30.30[post_30mzp])
EMA_30.30_Alpha = FisherZInv(mean(c(FisherZ(PRE_alpha), FisherZ(POST_alpha))))Korrelation zwischen den Pre- und Post-Intervall-Mittelwerten = -0.046.
Durchschnittliche paarweise Korrelation zwischen aufeinanderfolgenden Pre-MZP (Fisher-Z-transformiert): r = 0.38.
Durchschnittliche paarweise Korrelation zwischen aufeinanderfolgenden Post-MZP (Fisher-Z-transformiert): r = 0.29.
Mittleres Cronbach´s Alpha zwischen Pre-MZP und Post-MZP = 0.937.
# Korrelationsmatrix von PRE- und POST-MZP:
EMA_5.5_Window_KorMat = cor(EMA_5.5_Window[, c(pre_5mzp, post_5mzp)]) %>%
round(., digits = 2)
# durchschnittliche paarweise Korrelation zwischen aufeinanderfolgenden MZP (beachte: ohne Fisher-Z-Transformation):
pre_inter_item_rtt = 0L
for (i in 1:4) {
pre_inter_item_rtt = pre_inter_item_rtt + FisherZ(EMA_5.5_Window_KorMat[i,i+1])
}
pre_inter_item_rtt = FisherZInv(pre_inter_item_rtt / 4)
post_inter_item_rtt = 0L
for (i in 5:9) {
post_inter_item_rtt = post_inter_item_rtt + FisherZ(EMA_5.5_Window_KorMat[i,i+1])
}
post_inter_item_rtt = FisherZInv(post_inter_item_rtt / 4)
for (i in 1:9) {
EMA_5.5_Window_KorMat[i, i+1] = cell_spec(EMA_5.5_Window_KorMat[i, i+1], "html", bold = TRUE)
}
rownames(EMA_5.5_Window_KorMat) = cell_spec(rownames(EMA_5.5_Window_KorMat), "html", bold = TRUE)
EMA_5.5_Window_KorMat %>%
kable(., format = "html", escape = FALSE) %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"),
full_width = FALSE, fixed_thead = T)| PRE1_1 | PRE1_2 | PRE1_3 | PRE1_4 | PRE1_5 | POST1_1 | POST1_2 | POST1_3 | POST1_4 | POST1_5 | |
|---|---|---|---|---|---|---|---|---|---|---|
| PRE1_1 | 1 | 0.38 | 0.39 | 0.43 | 0.36 | -0.14 | -0.12 | 0.04 | 0 | -0.04 |
| PRE1_2 | 0.38 | 1 | 0.34 | 0.12 | 0.2 | -0.01 | -0.04 | -0.01 | 0 | -0.06 |
| PRE1_3 | 0.39 | 0.34 | 1 | 0.4 | 0.21 | -0.15 | 0.06 | 0.06 | -0.06 | 0.05 |
| PRE1_4 | 0.43 | 0.12 | 0.4 | 1 | 0.26 | -0.19 | -0.04 | 0.03 | -0.06 | -0.04 |
| PRE1_5 | 0.36 | 0.2 | 0.21 | 0.26 | 1 | -0.02 | 0.03 | 0.08 | 0.29 | 0.02 |
| POST1_1 | -0.14 | -0.01 | -0.15 | -0.19 | -0.02 | 1 | 0.37 | 0.07 | 0.17 | 0.25 |
| POST1_2 | -0.12 | -0.04 | 0.06 | -0.04 | 0.03 | 0.37 | 1 | 0.19 | 0.23 | 0.31 |
| POST1_3 | 0.04 | -0.01 | 0.06 | 0.03 | 0.08 | 0.07 | 0.19 | 1 | 0.35 | 0.22 |
| POST1_4 | 0 | 0 | -0.06 | -0.06 | 0.29 | 0.17 | 0.23 | 0.35 | 1 | 0.28 |
| POST1_5 | -0.04 | -0.06 | 0.05 | -0.04 | 0.02 | 0.25 | 0.31 | 0.22 | 0.28 | 1 |
# mittleres Cronbach´s Alpha zwischen Pre-MZP und Post-MZP:
PRE_alpha = CronbachAlpha(EMA_5.5_Window[pre_5mzp])
POST_alpha = CronbachAlpha(EMA_5.5_Window[post_5mzp])
EMA_5.5_Window_Alpha = FisherZInv(mean(c(FisherZ(PRE_alpha), FisherZ(POST_alpha))))Korrelation zwischen den Pre- und Post-Intervall-Mittelwerten = -0.033.
Durchschnittliche paarweise Korrelation zwischen aufeinanderfolgenden Pre-MZP (Fisher-Z-transformiert): r = 0.35.
Durchschnittliche paarweise Korrelation zwischen aufeinanderfolgenden Post-MZP (Fisher-Z-transformiert): r = 0.29.
Mittleres Cronbach´s Alpha zwischen Pre-MZP und Post-MZP = 0.655.
# Korrelationsmatrix von PRE- und POST-MZP:
EMA_5.5_Days_KorMat = cor(EMA_5.5_Days[, c(pre_5mzp, post_5mzp)]) %>%
round(., digits = 2)
# durchschnittliche paarweise Korrelation zwischen aufeinanderfolgenden MZP (beachte: ohne Fisher-Z-Transformation):
pre_inter_item_rtt = 0L
for (i in 1:4) {
pre_inter_item_rtt = pre_inter_item_rtt + FisherZ(EMA_5.5_Days_KorMat[i,i+1])
}
pre_inter_item_rtt = FisherZInv(pre_inter_item_rtt / 4)
post_inter_item_rtt = 0L
for (i in 5:9) {
post_inter_item_rtt = post_inter_item_rtt + FisherZ(EMA_5.5_Days_KorMat[i,i+1])
}
post_inter_item_rtt = FisherZInv(post_inter_item_rtt / 4)
for (i in 1:9) {
EMA_5.5_Days_KorMat[i, i+1] = cell_spec(EMA_5.5_Days_KorMat[i, i+1], "html", bold = TRUE)
}
rownames(EMA_5.5_Days_KorMat) = cell_spec(rownames(EMA_5.5_Days_KorMat), "html", bold = TRUE)
EMA_5.5_Days_KorMat %>%
kable(., format = "html", escape = FALSE) %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"),
full_width = FALSE, fixed_thead = T)| PRE1_1 | PRE1_2 | PRE1_3 | PRE1_4 | PRE1_5 | POST1_1 | POST1_2 | POST1_3 | POST1_4 | POST1_5 | |
|---|---|---|---|---|---|---|---|---|---|---|
| PRE1_1 | 1 | 0.28 | 0.56 | 0.3 | 0.36 | -0.08 | -0.06 | -0.04 | -0.15 | -0.04 |
| PRE1_2 | 0.28 | 1 | 0.35 | 0.41 | 0.33 | 0.11 | 0.12 | -0.01 | -0.02 | 0.08 |
| PRE1_3 | 0.56 | 0.35 | 1 | 0.35 | 0.44 | 0.07 | -0.03 | -0.12 | -0.16 | -0.08 |
| PRE1_4 | 0.3 | 0.41 | 0.35 | 1 | 0.27 | -0.13 | 0.02 | 0.01 | -0.24 | 0 |
| PRE1_5 | 0.36 | 0.33 | 0.44 | 0.27 | 1 | 0.04 | 0.03 | -0.2 | 0 | -0.02 |
| POST1_1 | -0.08 | 0.11 | 0.07 | -0.13 | 0.04 | 1 | 0.11 | -0.01 | 0.53 | 0.15 |
| POST1_2 | -0.06 | 0.12 | -0.03 | 0.02 | 0.03 | 0.11 | 1 | 0.34 | 0.41 | 0.39 |
| POST1_3 | -0.04 | -0.01 | -0.12 | 0.01 | -0.2 | -0.01 | 0.34 | 1 | 0.21 | 0.31 |
| POST1_4 | -0.15 | -0.02 | -0.16 | -0.24 | 0 | 0.53 | 0.41 | 0.21 | 1 | 0.26 |
| POST1_5 | -0.04 | 0.08 | -0.08 | 0 | -0.02 | 0.15 | 0.39 | 0.31 | 0.26 | 1 |
# mittleres Cronbach´s Alpha zwischen Pre-MZP und Post-MZP:
PRE_alpha = CronbachAlpha(EMA_5.5_Days[pre_5mzp])
POST_alpha = CronbachAlpha(EMA_5.5_Days[post_5mzp])
EMA_5.5_Days_Alpha = FisherZInv(mean(c(FisherZ(PRE_alpha), FisherZ(POST_alpha))))Korrelation zwischen den Pre- und Post-Intervall-Mittelwerten = -0.069.
Durchschnittliche paarweise Korrelation zwischen aufeinanderfolgenden Pre-MZP (Fisher-Z-transformiert): r = 0.31.
Durchschnittliche paarweise Korrelation zwischen aufeinanderfolgenden Post-MZP (Fisher-Z-transformiert): r = 0.24.
Mittleres Cronbach´s Alpha zwischen Pre-MZP und Post-MZP = 0.697.
Verteilungen der Pre-Post-Mittelwerts-Veränderungen
temp = tibble(MeanDiffs = c(EMA_5.5$MeanDiff, EMA_30.30$MeanDiff, EMA_5.5_Window$MeanDiff, EMA_5.5_Days$MeanDiff),
Datasets = rep(c("EMA_5.5", "EMA_30.30", "EMA_5.5_Window", "EMA_5.5_Days"), each = length(EMA_5.5$MeanDiff)))
temp %>%
ggplot(aes(x = MeanDiffs, fill = Datasets)) +
geom_histogram(alpha = 0.2, binwidth = 1, position = "identity") +
labs(title = "Pre-Post-Differences", x = "PHQ-9 Pre-Post-Difference")#scatter.hist(EMA_5.5$MeanDiff, EMA_30.30$MeanDiff, xlab = "EMA_5.5$MeanDiff",
# ylab = "EMA_30.30$MeanDiff", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))
#scatter.hist(EMA_5.5$MeanDiff, EMA_5.5_Window$MeanDiff, xlab = "EMA_5.5$MeanDiff",
# ylab = "EMA_5.5_Window$MeanDiff", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))
#scatter.hist(EMA_5.5$MeanDiff, EMA_5.5_Days$MeanDiff, xlab = "EMA_5.5$MeanDiff",
# ylab = "EMA_5.5_Days$MeanDiff", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))
#scatter.hist(EMA_5.5_Window$MeanDiff, EMA_5.5_Days$MeanDiff, xlab = "EMA_5.5_Window$MeanDiff",
# ylab = "EMA_5.5_Days$MeanDiff", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))Korrelation zwischen den Pre-Post-Differenzen in EMA_5.5 und EMA_30.30 = 1.
Korrelation zwischen den Pre-Post-Differenzen in EMA_5.5_Window und EMA_30.30 = 0.907.
Korrelation zwischen den Pre-Post-Differenzen in EMA_5.5_Days und EMA_30.30 = 0.887.
Prozentuale Überlappung der Pre-Post-Mittelwerts-Veränderungen
# Overlap-Plots zum Vergleich
final.plot(list(EMA_5.5_MeanDiff = EMA_5.5$MeanDiff, EMA_30.30_MeanDiff = EMA_30.30$MeanDiff),
overlap(list(EMA_5.5_MeanDiff = EMA_5.5$MeanDiff, EMA_30.30_MeanDiff = EMA_30.30$MeanDiff))$OV)final.plot(list(EMA_5.5_Window_MeanDiff = EMA_5.5_Window$MeanDiff, EMA_30.30_MeanDiff = EMA_30.30$MeanDiff),
overlap(list(EMA_5.5_Window_MeanDiff = EMA_5.5_Window$MeanDiff, EMA_30.30_MeanDiff = EMA_30.30$MeanDiff))$OV)final.plot(list(EMA_5.5_Days_MeanDiff = EMA_5.5_Days$MeanDiff, EMA_30.30_MeanDiff = EMA_30.30$MeanDiff),
overlap(list(EMA_5.5_Days_MeanDiff = EMA_5.5_Days$MeanDiff, EMA_30.30_MeanDiff = EMA_30.30$MeanDiff))$OV)final.plot(list(EMA_5.5_Window_MeanDiff = EMA_5.5_Window$MeanDiff, EMA_5.5_Days_MeanDiff = EMA_5.5_Days$MeanDiff),
overlap(list(EMA_5.5_Window_MeanDiff = EMA_5.5_Window$MeanDiff, EMA_5.5_Days_MeanDiff = EMA_5.5_Days$MeanDiff))$OV)Cohen´s d (mit gepoolten SDs) vom Pre- zum Post-Intervall in EMA_5.5 (je 5 MZP)
\[ d = \frac{\overline{x_{1}} - \overline{x_{2}}} {\sqrt{0.5 \cdot (s_{x}^2 + s_{y}^2)}} \]
\(\overline{x_{1}}\) = mean of subject´s pretest scores, \(\overline{x_{2}}\) = mean of subject´s posttest scores, \(s_{x}\) = individual standard deviation of pretest time points, \(s_{y}\) = individual standard deviation of posttest time points
EMA_5.5$Cohen_d = (EMA_5.5$PRE_Mean - EMA_5.5$POST_Mean) / sqrt(0.5 * (EMA_5.5$ind.pretestSD^2 + EMA_5.5$ind.posttestSD^2))
# Sollen Cohen_d %in% c(-Inf,Inf) ein-/ausgeschlossen werden?
#EMA_5.5 = EMA_5.5 %>%
# within(., {Cohen_d[Cohen_d %in% c(-Inf,Inf)] = NA})
#hist(EMA_5.5$Cohen_d, col = "lightblue1", main = "EMA_5.5$Cohen_d")
cohen_d_5.5 = (mean(EMA_5.5$PRE_Mean) - mean(EMA_5.5$POST_Mean)) / sqrt(0.5 * (mean(EMA_5.5$ind.pretestSD)^2 +
mean(EMA_5.5$ind.posttestSD)^2))
final.plot(list(EMA_5.5_PRE_Mean = EMA_5.5$PRE_Mean, EMA_5.5_POST_Mean = EMA_5.5$POST_Mean),
overlap(list(EMA_5.5_PRE_Mean = EMA_5.5$PRE_Mean, EMA_5.5_POST_Mean = EMA_5.5$POST_Mean))$OV)Gepoolte Varianz zwischen Pre- und Post-Intervall-Mittelwerten in EMA_5.5 = 3.09.
Durchschnittliches Cohen´s d zwischen Pre- und Post-Mittelwerten (für jede Person einzeln berechnet) in EMA_5.5 = 1.129.
Durchschnittliches Cohen´s d zwischen Pre- und Post-Mittelwerten in EMA_5.5 = 0.991.
Cohen´s d (mit gepoolten SDs) vom Pre- zum Post-Intervall in den erweiterten Intervall-Daten (je 30 MZP)
EMA_30.30$Cohen_d = (EMA_30.30$PRE_Mean - EMA_30.30$POST_Mean) / sqrt(0.5 * (EMA_30.30$ind.pretestSD^2 + EMA_30.30$ind.posttestSD^2))
# Sollen Cohen_d %in% c(-Inf,Inf) ein-/ausgeschlossen werden?
#EMA_30.30 = EMA_30.30 %>%
# within(., {Cohen_d[Cohen_d %in% c(-Inf,Inf)] = NA})
#hist(EMA_30.30$Cohen_d, col = "lightblue1", main = "EMA_30.30$Cohen_d")
cohen_d_30.30 = (mean(EMA_30.30$PRE_Mean) - mean(EMA_30.30$POST_Mean)) / sqrt(0.5 * (mean(EMA_30.30$ind.pretestSD)^2 +
mean(EMA_30.30$ind.posttestSD)^2))
final.plot(list(EMA_30.30_PRE_Mean = EMA_30.30$PRE_Mean, EMA_30.30_POST_Mean = EMA_30.30$POST_Mean),
overlap(list(EMA_30.30_PRE_Mean = EMA_30.30$PRE_Mean, EMA_30.30_POST_Mean = EMA_30.30$POST_Mean))$OV)Gepoolte Varianz zwischen Pre- und Post-Intervall-Mittelwerten in EMA_30.30 = 3.09.
Durchschnittliches Cohen´s d zwischen Pre- und Post-Mittelwerten (für jede Person einzeln berechnet) in EMA_30.30 = 1.241.
Durchschnittliches Cohen´s d zwischen Pre- und Post-Mittelwerten in EMA_30.30 = 1.089.
Cohen´s d (mit gepoolten SDs) vom Pre- zum Post-Intervall in EMA_5.5_Window (je 5 MZP)
EMA_5.5_Window$Cohen_d = (EMA_5.5_Window$PRE_Mean - EMA_5.5_Window$POST_Mean) / sqrt(0.5 * (EMA_5.5_Window$ind.pretestSD^2 + EMA_5.5_Window$ind.posttestSD^2))
# Sollen Cohen_d %in% c(-Inf,Inf) ein-/ausgeschlossen werden?
#EMA_5.5_Window = EMA_5.5_Window %>%
# within(., {Cohen_d[Cohen_d %in% c(-Inf,Inf)] = NA})
#hist(EMA_5.5_Window$Cohen_d, col = "lightblue1", main = "EMA_5.5_Window$Cohen_d")
cohen_d_5.5_Window = (mean(EMA_5.5_Window$PRE_Mean) - mean(EMA_5.5_Window$POST_Mean)) / sqrt(0.5 * (mean(EMA_5.5_Window$ind.pretestSD)^2 + mean(EMA_5.5_Window$ind.posttestSD)^2))
final.plot(list(EMA_5.5_Window_PRE_Mean = EMA_5.5_Window$PRE_Mean, EMA_5.5_Window_POST_Mean = EMA_5.5_Window$POST_Mean),
overlap(list(EMA_5.5_Window_PRE_Mean = EMA_5.5_Window$PRE_Mean, EMA_5.5_Window_POST_Mean = EMA_5.5_Window$POST_Mean))$OV)Gepoolte Varianz zwischen Pre- und Post-Intervall-Mittelwerten in EMA_5.5_Window = 3.379.
Durchschnittliches Cohen´s d zwischen Pre- und Post-Mittelwerten (für jede Person einzeln berechnet) in EMA_5.5_Window = 1.215.
Durchschnittliches Cohen´s d zwischen Pre- und Post-Mittelwerten in EMA_5.5_Window = 1.025.
Cohen´s d (mit gepoolten SDs) vom Pre- zum Post-Intervall in EMA_5.5_Days (je 5 MZP)
EMA_5.5_Days$Cohen_d = (EMA_5.5_Days$PRE_Mean - EMA_5.5_Days$POST_Mean) / sqrt(0.5 * (EMA_5.5_Days$ind.pretestSD^2 + EMA_5.5_Days$ind.posttestSD^2))
# Sollen Cohen_d %in% c(-Inf,Inf) ein-/ausgeschlossen werden?
#EMA_5.5_Days = EMA_5.5_Days %>%
# within(., {Cohen_d[Cohen_d %in% c(-Inf,Inf)] = NA})
#hist(EMA_5.5_Days$Cohen_d, col = "lightblue1", main = "EMA_5.5_Days$Cohen_d")
cohen_d_5.5_Days = (mean(EMA_5.5_Days$PRE_Mean) - mean(EMA_5.5_Days$POST_Mean)) / sqrt(0.5 * (mean(EMA_5.5_Days$ind.pretestSD)^2 + mean(EMA_5.5_Days$ind.posttestSD)^2))
final.plot(list(EMA_5.5_Days_PRE_Mean = EMA_5.5_Days$PRE_Mean, EMA_5.5_Days_POST_Mean = EMA_5.5_Days$POST_Mean),
overlap(list(EMA_5.5_Days_PRE_Mean = EMA_5.5_Days$PRE_Mean, EMA_5.5_Days_POST_Mean = EMA_5.5_Days$POST_Mean))$OV)Gepoolte Varianz zwischen Pre- und Post-Intervall-Mittelwerten in EMA_5.5_Days = 3.435.
Durchschnittliches Cohen´s d zwischen Pre- und Post-Mittelwerten (für jede Person einzeln berechnet) in EMA_5.5_Days = 1.399.
Durchschnittliches Cohen´s d zwischen Pre- und Post-Mittelwerten in EMA_5.5_Days = 1.166.
Ab hier nur noch Vergleiche in EMA_30.30, EMA_5.5_Window und EMA_5.5_Days:
PHQ_Int = tibble(PHQ_Score = c("0-4","5-9","10-14","15-19","20-27"),
Klassifikation = c(0,1,2,3,4),
Interpretation = c("Minimal or none","Mild","Moderate","Moderately severe","Severe"))EMA_30.30 = EMA_30.30 %>%
mutate(PRE_Mean_klass = case_when(
PRE_Mean <= 4 ~ 0,
PRE_Mean > 4 & PRE_Mean < 10 ~ 1,
PRE_Mean >= 10 & PRE_Mean < 15 ~ 2,
PRE_Mean >= 15 & PRE_Mean < 20 ~ 3,
PRE_Mean >= 20 ~ 4,
TRUE ~ PRE_Mean
)
)
temp = EMA_30.30 %>%
count(PRE_Mean_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
PHQ_Int %>%
dplyr::rename(PRE_Mean_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| PHQ_Score | PRE_Mean_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| 0-4 | 0 | Minimal or none | NA | NA |
| 5-9 | 1 | Mild | 40 | 40 |
| 10-14 | 2 | Moderate | 60 | 60 |
| 15-19 | 3 | Moderately severe | NA | NA |
| 20-27 | 4 | Severe | NA | NA |
EMA_30.30 = EMA_30.30 %>%
mutate(POST_Mean_klass = case_when(
POST_Mean <= 4 ~ 0,
POST_Mean > 4 & POST_Mean < 10 ~ 1,
POST_Mean >= 10 & POST_Mean < 15 ~ 2,
POST_Mean >= 15 & POST_Mean < 20 ~ 3,
POST_Mean >= 20 ~ 4,
TRUE ~ POST_Mean
)
)
temp = EMA_30.30 %>%
count(POST_Mean_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
PHQ_Int %>%
dplyr::rename(POST_Mean_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| PHQ_Score | POST_Mean_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| 0-4 | 0 | Minimal or none | 8 | 8 |
| 5-9 | 1 | Mild | 73 | 73 |
| 10-14 | 2 | Moderate | 19 | 19 |
| 15-19 | 3 | Moderately severe | NA | NA |
| 20-27 | 4 | Severe | NA | NA |
temp = tibble(Klassifikation = c(EMA_30.30$PRE_Mean_klass, EMA_30.30$POST_Mean_klass),
MZP = rep(c("PRE_Mean_klass", "POST_Mean_klass"), each = length(EMA_30.30$PRE_Mean_klass)))
temp %>%
ggplot(aes(x = Klassifikation, fill = MZP)) +
geom_histogram(alpha = 0.2, binwidth = 1, position = "identity") +
labs(title = "EMA_30.30: PHQ-9 Classification", x = "Classification")EMA_5.5_Window = EMA_5.5_Window %>%
mutate(PRE_Mean_klass = case_when(
PRE_Mean <= 4 ~ 0,
PRE_Mean > 4 & PRE_Mean < 10 ~ 1,
PRE_Mean >= 10 & PRE_Mean < 15 ~ 2,
PRE_Mean >= 15 & PRE_Mean < 20 ~ 3,
PRE_Mean >= 20 ~ 4,
TRUE ~ PRE_Mean
)
)
temp = EMA_5.5_Window %>%
count(PRE_Mean_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
PHQ_Int %>%
dplyr::rename(PRE_Mean_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| PHQ_Score | PRE_Mean_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| 0-4 | 0 | Minimal or none | NA | NA |
| 5-9 | 1 | Mild | 41 | 41 |
| 10-14 | 2 | Moderate | 57 | 57 |
| 15-19 | 3 | Moderately severe | 2 | 2 |
| 20-27 | 4 | Severe | NA | NA |
EMA_5.5_Window = EMA_5.5_Window %>%
mutate(POST_Mean_klass = case_when(
POST_Mean <= 4 ~ 0,
POST_Mean > 4 & POST_Mean < 10 ~ 1,
POST_Mean >= 10 & POST_Mean < 15 ~ 2,
POST_Mean >= 15 & POST_Mean < 20 ~ 3,
POST_Mean >= 20 ~ 4,
TRUE ~ POST_Mean
)
)
temp = EMA_5.5_Window %>%
count(POST_Mean_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
PHQ_Int %>%
dplyr::rename(POST_Mean_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| PHQ_Score | POST_Mean_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| 0-4 | 0 | Minimal or none | 8 | 8 |
| 5-9 | 1 | Mild | 70 | 70 |
| 10-14 | 2 | Moderate | 22 | 22 |
| 15-19 | 3 | Moderately severe | NA | NA |
| 20-27 | 4 | Severe | NA | NA |
temp = tibble(Klassifikation = c(EMA_5.5_Window$PRE_Mean_klass, EMA_5.5_Window$POST_Mean_klass),
MZP = rep(c("PRE_Mean_klass", "POST_Mean_klass"), each = length(EMA_5.5_Window$PRE_Mean_klass)))
temp %>%
ggplot(aes(x = Klassifikation, fill = MZP)) +
geom_histogram(alpha = 0.2, binwidth = 1, position = "identity") +
labs(title = "EMA_5.5_Window: PHQ-9 Classification", x = "Classification")EMA_5.5_Days = EMA_5.5_Days %>%
mutate(PRE_Mean_klass = case_when(
PRE_Mean <= 4 ~ 0,
PRE_Mean > 4 & PRE_Mean < 10 ~ 1,
PRE_Mean >= 10 & PRE_Mean < 15 ~ 2,
PRE_Mean >= 15 & PRE_Mean < 20 ~ 3,
PRE_Mean >= 20 ~ 4,
TRUE ~ PRE_Mean
)
)
temp = EMA_5.5_Days %>%
count(PRE_Mean_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
PHQ_Int %>%
dplyr::rename(PRE_Mean_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| PHQ_Score | PRE_Mean_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| 0-4 | 0 | Minimal or none | NA | NA |
| 5-9 | 1 | Mild | 41 | 41 |
| 10-14 | 2 | Moderate | 58 | 58 |
| 15-19 | 3 | Moderately severe | 1 | 1 |
| 20-27 | 4 | Severe | NA | NA |
EMA_5.5_Days = EMA_5.5_Days %>%
mutate(POST_Mean_klass = case_when(
POST_Mean <= 4 ~ 0,
POST_Mean > 4 & POST_Mean < 10 ~ 1,
POST_Mean >= 10 & POST_Mean < 15 ~ 2,
POST_Mean >= 15 & POST_Mean < 20 ~ 3,
POST_Mean >= 20 ~ 4,
TRUE ~ POST_Mean
)
)
temp = EMA_5.5_Days %>%
count(POST_Mean_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
PHQ_Int %>%
dplyr::rename(POST_Mean_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| PHQ_Score | POST_Mean_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| 0-4 | 0 | Minimal or none | 11 | 11 |
| 5-9 | 1 | Mild | 71 | 71 |
| 10-14 | 2 | Moderate | 18 | 18 |
| 15-19 | 3 | Moderately severe | NA | NA |
| 20-27 | 4 | Severe | NA | NA |
temp = tibble(Klassifikation = c(EMA_5.5_Days$PRE_Mean_klass, EMA_5.5_Days$POST_Mean_klass),
MZP = rep(c("PRE_Mean_klass", "POST_Mean_klass"), each = length(EMA_5.5_Days$PRE_Mean_klass)))
temp %>%
ggplot(aes(x = Klassifikation, fill = MZP)) +
geom_histogram(alpha = 0.2, binwidth = 1, position = "identity") +
labs(title = "EMA_5.5_Days: PHQ-9 Classification", x = "Classification")
\[
PC = \Bigl(1 - \frac{\overline{x_{2}}} {\overline{x_{1}}}\Bigr) \cdot 100
\]
\(\overline{x_{2}}\) = mean of subject´s posttest scores, \(\overline{x_{1}}\) = mean of subject´s pretest scores
Interpretation des Percentage Change:
PC_Int = tibble(PC = c("PC <= -50","-50 < PC <= -25","-25 < PC < 25","25 <= PC < 50","PC >= 50"),
Klassifikation = c(-2,-1,0,1,2),
Interpretation = c("starke Verschlechterung","Verschlechterung","keine Veränderung",
"Verbesserung","starke Verbesserung"))EMA_30.30$Mean_PC = (1-(EMA_30.30$POST_Mean / EMA_30.30$PRE_Mean)) * 100
# Sollen Mean_PC %in% c(-Inf,Inf) ein-/ausgeschlossen werden?
#EMA_30.30 = EMA_30.30 %>%
# within(., {Mean_PC[Mean_PC %in% c(-Inf,Inf)] = NA})
EMA_30.30 = EMA_30.30 %>%
mutate(Mean_PC_klass = case_when(
Mean_PC <= -50 ~ -2,
Mean_PC > -50 & Mean_PC <= -25 ~ -1,
Mean_PC > -25 & Mean_PC < 25 ~ 0,
Mean_PC >= 25 & Mean_PC < 50 ~ 1,
Mean_PC >= 50 ~ 2,
TRUE ~ Mean_PC
)
)
temp = EMA_30.30 %>%
dplyr::count(Mean_PC_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
PC_Int %>%
dplyr::rename(Mean_PC_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| PC | Mean_PC_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| PC <= -50 | -2 | starke Verschlechterung | NA | NA |
| -50 < PC <= -25 | -1 | Verschlechterung | 4 | 4 |
| -25 < PC < 25 | 0 | keine Veränderung | 43 | 43 |
| 25 <= PC < 50 | 1 | Verbesserung | 30 | 30 |
| PC >= 50 | 2 | starke Verbesserung | 23 | 23 |
scatter.hist(EMA_30.30$PRE_Mean, EMA_30.30$Mean_PC, xlab = "EMA_30.30$PRE_Mean", ylab = "EMA_30.30$Mean_PC", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))Korrelation Mean Percentage Change (je 30 MZP) mit PHQ-Baseline (Pre-Intervall-Mean) = 0.533.
EMA_5.5_Window$Mean_PC = (1-(EMA_5.5_Window$POST_Mean / EMA_5.5_Window$PRE_Mean)) * 100
# Sollen Mean_PC %in% c(-Inf,Inf) ein-/ausgeschlossen werden?
#EMA_5.5_Window = EMA_5.5_Window %>%
# within(., {Mean_PC[Mean_PC %in% c(-Inf,Inf)] = NA})
EMA_5.5_Window = EMA_5.5_Window %>%
mutate(Mean_PC_klass = case_when(
Mean_PC <= -50 ~ -2,
Mean_PC > -50 & Mean_PC <= -25 ~ -1,
Mean_PC > -25 & Mean_PC < 25 ~ 0,
Mean_PC >= 25 & Mean_PC < 50 ~ 1,
Mean_PC >= 50 ~ 2,
TRUE ~ Mean_PC
)
)
temp = EMA_5.5_Window %>%
dplyr::count(Mean_PC_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
PC_Int %>%
dplyr::rename(Mean_PC_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| PC | Mean_PC_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| PC <= -50 | -2 | starke Verschlechterung | 2 | 2 |
| -50 < PC <= -25 | -1 | Verschlechterung | 4 | 4 |
| -25 < PC < 25 | 0 | keine Veränderung | 43 | 43 |
| 25 <= PC < 50 | 1 | Verbesserung | 25 | 25 |
| PC >= 50 | 2 | starke Verbesserung | 26 | 26 |
scatter.hist(EMA_5.5_Window$PRE_Mean, EMA_5.5_Window$Mean_PC, xlab = "EMA_5.5_Window$PRE_Mean", ylab = "EMA_5.5_Window$Mean_PC", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))Korrelation Mean Percentage Change (je 5 MZP) mit PHQ-Baseline (Pre-Intervall-Mean) = 0.528.
EMA_5.5_Days$Mean_PC = (1-(EMA_5.5_Days$POST_Mean / EMA_5.5_Days$PRE_Mean)) * 100
# Sollen Mean_PC %in% c(-Inf,Inf) ein-/ausgeschlossen werden?
#EMA_5.5_Days = EMA_5.5_Days %>%
# within(., {Mean_PC[Mean_PC %in% c(-Inf,Inf)] = NA})
EMA_5.5_Days = EMA_5.5_Days %>%
mutate(Mean_PC_klass = case_when(
Mean_PC <= -50 ~ -2,
Mean_PC > -50 & Mean_PC <= -25 ~ -1,
Mean_PC > -25 & Mean_PC < 25 ~ 0,
Mean_PC >= 25 & Mean_PC < 50 ~ 1,
Mean_PC >= 50 ~ 2,
TRUE ~ Mean_PC
)
)
temp = EMA_5.5_Days %>%
dplyr::count(Mean_PC_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
PC_Int %>%
dplyr::rename(Mean_PC_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| PC | Mean_PC_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| PC <= -50 | -2 | starke Verschlechterung | 2 | 2 |
| -50 < PC <= -25 | -1 | Verschlechterung | 8 | 8 |
| -25 < PC < 25 | 0 | keine Veränderung | 32 | 32 |
| 25 <= PC < 50 | 1 | Verbesserung | 29 | 29 |
| PC >= 50 | 2 | starke Verbesserung | 29 | 29 |
scatter.hist(EMA_5.5_Days$PRE_Mean, EMA_5.5_Days$Mean_PC, xlab = "EMA_5.5_Days$PRE_Mean", ylab = "EMA_5.5_Days$Mean_PC", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))Korrelation Mean Percentage Change (je 5 MZP) mit PHQ-Baseline (Pre-Intervall-Mean) = 0.545.
scatter.hist(EMA_30.30$Mean_PC, EMA_5.5_Window$Mean_PC, xlab = "EMA_30.30$Mean_PC", ylab = "EMA_5.5_Window$Mean_PC", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))
scatter.hist(EMA_30.30$Mean_PC, EMA_5.5_Days$Mean_PC, xlab = "EMA_30.30$Mean_PC", ylab = "EMA_5.5_Days$Mean_PC", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))
scatter.hist(EMA_5.5_Window$Mean_PC, EMA_5.5_Days$Mean_PC, xlab = "EMA_5.5_Window$Mean_PC", ylab = "EMA_5.5_Days$Mean_PC", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))
\[
RCI_{ind,preSD} = \frac{\overline{x_{2}} - \overline{x_{1}}} {SE_{D,pre}}
\]
\[ SE_{D,pre} = \sqrt{2 \cdot (s_{x} \cdot (1 - r_{xy})^2)} \]
\[ \text{significance cutoff} = 1.96 \cdot SE_{D,pre} = 1.96 \cdot \sqrt{2 \cdot (s_{x} \cdot (1 - r_{xy})^2)} \]
\(\overline{x_{2}}\) = mean of subject´s posttest scores, \(\overline{x_{1}}\) = mean of subject´s pretest scores, \(SE_{D,pre}\) = standard error of difference between the test scores in the individual´s pre interval \(s_{x}\) = individual standard deviation of pretest time points, \(r_{xy}\) = reliability (internal consistency Cronbach´s \(\alpha\)) of the measure, \(\text{significance cutoff}\) = (absolute) cutoff score for reliable change (95%-criterion)
EMA_30.30
EMA_30.30$SEd_pre = sqrt(2 * (EMA_30.30$ind.pretestSD * sqrt(1 - EMA_5.5_Alpha)) ^ 2)
EMA_30.30$RCI_ind_preSD = (EMA_30.30$POST_Mean - EMA_30.30$PRE_Mean) / EMA_30.30$SEd_pre
EMA_30.30$RCI_ind_preSD_Cutoff = 1.96 * EMA_30.30$SEd_pre
# Sollen SEd_pre, RCI_ind_preSD und RCI_ind_preSD_Cutoff %in% c(-Inf,Inf) ein-/ausgeschlossen werden?
#EMA_30.30 = EMA_30.30 %>%
# within(., {SEd_pre[SEd_pre %in% c(-Inf,Inf)] = NA
# RCI_ind_preSD[RCI_ind_preSD %in% c(-Inf,Inf)] = NA
# RCI_ind_preSD_Cutoff[RCI_ind_preSD_Cutoff %in% c(-Inf,Inf)] = NA})
scatter.hist(EMA_30.30$PRE_Mean, EMA_30.30$RCI_ind_preSD, xlab = "EMA_30.30$PRE_Mean", ylab = "EMA_30.30$RCI_ind_preSD", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))Durchschnittlicher RCI(ind)-Cutoff für reliable Veränderung in EMA_30.30 = 4.494.
Korrelation RCI(ind) nur mit Pre-SD (je 30 MZP) mit PHQ-Baseline (Pre-Intervall-Mean) = -0.594.
EMA_5.5_Window
EMA_5.5_Window$SEd_pre = sqrt(2 * (EMA_5.5_Window$ind.pretestSD * sqrt(1 - EMA_5.5_Alpha)) ^ 2)
EMA_5.5_Window$RCI_ind_preSD = (EMA_5.5_Window$POST_Mean - EMA_5.5_Window$PRE_Mean) / EMA_5.5_Window$SEd_pre
EMA_5.5_Window$RCI_ind_preSD_Cutoff = 1.96 * EMA_5.5_Window$SEd_pre
# Sollen SEd_pre, RCI_ind_preSD und RCI_ind_preSD_Cutoff %in% c(-Inf,Inf) ein-/ausgeschlossen werden?
#EMA_5.5_Window = EMA_5.5_Window %>%
# within(., {SEd_pre[SEd_pre %in% c(-Inf,Inf)] = NA
# RCI_ind_preSD[RCI_ind_preSD %in% c(-Inf,Inf)] = NA
# RCI_ind_preSD_Cutoff[RCI_ind_preSD_Cutoff %in% c(-Inf,Inf)] = NA})
scatter.hist(EMA_5.5_Window$PRE_Mean, EMA_5.5_Window$RCI_ind_preSD, xlab = "EMA_5.5_Window$PRE_Mean", ylab = "EMA_5.5_Window$RCI_ind_preSD", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))Durchschnittlicher RCI(ind)-Cutoff für reliable Veränderung in EMA_5.5_Window = 4.598.
Korrelation RCI(ind) nur mit Pre-SD (je 5 MZP) mit PHQ-Baseline (Pre-Intervall-Mean) = -0.578.
EMA_5.5_Days
EMA_5.5_Days$SEd_pre = sqrt(2 * (EMA_5.5_Days$ind.pretestSD * sqrt(1 - EMA_5.5_Alpha)) ^ 2)
EMA_5.5_Days$RCI_ind_preSD = (EMA_5.5_Days$POST_Mean - EMA_5.5_Days$PRE_Mean) / EMA_5.5_Days$SEd_pre
EMA_5.5_Days$RCI_ind_preSD_Cutoff = 1.96 * EMA_5.5_Days$SEd_pre
# Sollen SEd_pre, RCI_ind_preSD und RCI_ind_preSD_Cutoff %in% c(-Inf,Inf) ein-/ausgeschlossen werden?
#EMA_5.5_Days = EMA_5.5_Days %>%
# within(., {SEd_pre[SEd_pre %in% c(-Inf,Inf)] = NA
# RCI_ind_preSD[RCI_ind_preSD %in% c(-Inf,Inf)] = NA
# RCI_ind_preSD_Cutoff[RCI_ind_preSD_Cutoff %in% c(-Inf,Inf)] = NA})
scatter.hist(EMA_5.5_Days$PRE_Mean, EMA_5.5_Days$RCI_ind_preSD, xlab = "EMA_5.5_Days$PRE_Mean", ylab = "EMA_5.5_Days$RCI_ind_preSD", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))Durchschnittlicher RCI(ind)-Cutoff für reliable Veränderung in EMA_5.5_Days = 4.215.
Korrelation RCI(ind) nur mit Pre-SD (je 5 MZP) mit PHQ-Baseline (Pre-Intervall-Mean) = -0.567.
\[
RCI_{ind} = \frac{\overline{x_{2}} - \overline{x_{1}}} {SE_{D}}
\]
\[ SE_{D} = \sqrt{(s_{x}^2 + s_{y}^2) \cdot (1 - r_{xy})} \]
\[ \text{significance cutoff} = 1.96 \cdot SE_{D} = 1.96 \cdot \sqrt{(s_{x}^2 + s_{y}^2) \cdot (1 - r_{xy})} \]
\(\overline{x_{2}}\) = mean of subject´s posttest scores, \(\overline{x_{1}}\) = mean of subject´s pretest scores, \(SE_{D}\) = pooled standard error of difference between the test scores \(s_{x}\) = individual standard deviation of pretest time points, \(s_{y}\) = individual standard deviation of pretest time points, \(r_{xy}\) = reliability (internal consistency Cronbach´s \(\alpha\)) of the measure, \(\text{significance cutoff}\) = (absolute) cutoff score for reliable change (95%-criterion)
EMA_30.30
EMA_30.30$SEd_pooled = sqrt((EMA_30.30$ind.pretestSD ^ 2 + EMA_30.30$ind.posttestSD ^ 2) * (1 - EMA_5.5_Alpha))
EMA_30.30$RCI_ind_pooledSD = (EMA_30.30$POST_Mean - EMA_30.30$PRE_Mean) / EMA_30.30$SEd_pooled
EMA_30.30$RCI_ind_pooledSD_Cutoff = 1.96 * EMA_30.30$SEd_pooled
# Sollen SEd_pooled, RCI_ind_pooledSD und RCI_ind_pooledSD_Cutoff %in% c(-Inf,Inf) ein-/ausgeschlossen werden?
#EMA_30.30 = EMA_30.30 %>%
# within(., {SEd_pooled[SEd_pooled %in% c(-Inf,Inf)] = NA
# RCI_ind_pooledSD[RCI_ind_pooledSD %in% c(-Inf,Inf)] = NA
# RCI_ind_pooledSD_Cutoff[RCI_ind_pooledSD_Cutoff %in% c(-Inf,Inf)] = NA})
scatter.hist(EMA_30.30$PRE_Mean, EMA_30.30$RCI_ind_pooledSD, xlab = "EMA_30.30$PRE_Mean", ylab = "EMA_30.30$RCI_ind_pooledSD", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))Durchschnittlicher RCI(ind)-Cutoff für reliable Veränderung in EMA_30.30 = 5.558.
Korrelation RCI(ind) mit pooled SDs (je 30 MZP) mit PHQ-Baseline (Pre-Intervall-Mean) = -0.53.
EMA_5.5_Window
EMA_5.5_Window$SEd_pooled = sqrt((EMA_5.5_Window$ind.pretestSD ^ 2 + EMA_5.5_Window$ind.posttestSD ^ 2) * (1 - EMA_5.5_Alpha))
EMA_5.5_Window$RCI_ind_pooledSD = (EMA_5.5_Window$POST_Mean - EMA_5.5_Window$PRE_Mean) / EMA_5.5_Window$SEd_pooled
EMA_5.5_Window$RCI_ind_pooledSD_Cutoff = 1.96 * EMA_5.5_Window$SEd_pooled
# Sollen SEd_pooled, RCI_ind_pooledSD und RCI_ind_pooledSD_Cutoff %in% c(-Inf,Inf) ein-/ausgeschlossen werden?
#EMA_5.5_Window = EMA_5.5_Window %>%
# within(., {SEd_pooled[SEd_pooled %in% c(-Inf,Inf)] = NA
# RCI_ind_pooledSD[RCI_ind_pooledSD %in% c(-Inf,Inf)] = NA
# RCI_ind_pooledSD_Cutoff[RCI_ind_pooledSD_Cutoff %in% c(-Inf,Inf)] = NA})
scatter.hist(EMA_5.5_Window$PRE_Mean, EMA_5.5_Window$RCI_ind_pooledSD, xlab = "EMA_5.5_Window$PRE_Mean", ylab = "EMA_5.5_Window$RCI_ind_pooledSD", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))Durchschnittlicher RCI(ind)-Cutoff für reliable Veränderung in EMA_5.5_Window = 5.719.
Korrelation RCI(ind) mit pooled SDs (je 5 MZP) mit PHQ-Baseline (Pre-Intervall-Mean) = -0.515.
EMA_5.5_Days
EMA_5.5_Days$SEd_pooled = sqrt((EMA_5.5_Days$ind.pretestSD ^ 2 + EMA_5.5_Days$ind.posttestSD ^ 2) * (1 - EMA_5.5_Alpha))
EMA_5.5_Days$RCI_ind_pooledSD = (EMA_5.5_Days$POST_Mean - EMA_5.5_Days$PRE_Mean) / EMA_5.5_Days$SEd_pooled
EMA_5.5_Days$RCI_ind_pooledSD_Cutoff = 1.96 * EMA_5.5_Days$SEd_pooled
# Sollen SEd_pooled, RCI_ind_pooledSD und RCI_ind_pooledSD_Cutoff %in% c(-Inf,Inf) ein-/ausgeschlossen werden?
#EMA_5.5_Days = EMA_5.5_Days %>%
# within(., {SEd_pooled[SEd_pooled %in% c(-Inf,Inf)] = NA
# RCI_ind_pooledSD[RCI_ind_pooledSD %in% c(-Inf,Inf)] = NA
# RCI_ind_pooledSD_Cutoff[RCI_ind_pooledSD_Cutoff %in% c(-Inf,Inf)] = NA})
scatter.hist(EMA_5.5_Days$PRE_Mean, EMA_5.5_Days$RCI_ind_pooledSD, xlab = "EMA_5.5_Days$PRE_Mean", ylab = "EMA_5.5_Days$RCI_ind_pooledSD", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))Durchschnittlicher RCI(ind)-Cutoff für reliable Veränderung in EMA_5.5_Days = 5.394.
Korrelation RCI(ind) mit pooled SDs (je 5 MZP) mit PHQ-Baseline (Pre-Intervall-Mean) = -0.548.
scatter.hist(EMA_30.30$RCI_ind_preSD, EMA_30.30$RCI_ind_pooledSD, xlab = "EMA_30.30$RCI_ind_preSD", ylab =
"EMA_30.30$RCI_ind_pooledSD", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))
scatter.hist(EMA_5.5_Window$RCI_ind_preSD, EMA_5.5_Window$RCI_ind_pooledSD, xlab = "EMA_5.5_Window$RCI_ind_preSD", ylab =
"EMA_5.5_Window$RCI_ind_pooledSD", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))
scatter.hist(EMA_5.5_Days$RCI_ind_preSD, EMA_5.5_Days$RCI_ind_pooledSD, xlab = "EMA_5.5_Days$RCI_ind_preSD", ylab =
"EMA_5.5_Days$RCI_ind_pooledSD", ellipse = FALSE, grid = TRUE, col = c("dodgerblue", "darkorange"))RCI_Int = tibble(RCI = c("RCI < -1,96","-1,96 <= RCI <= 1,96","RCI > 1,96"),
Klassifikation = c(-1,0,1),
Interpretation = c("reliable Verbesserung","keine reliable Veränderung","reliable Verschlechterung"))EMA_30.30: RCI(ind) nur mit Pre-SDs
EMA_30.30 = EMA_30.30 %>%
mutate(RCI_ind_preSD_klass = case_when(
RCI_ind_preSD < -1.96 ~ -1,
RCI_ind_preSD >= -1.96 & RCI_ind_preSD < 1.96 ~ 0,
RCI_ind_preSD > 1.96 ~ 1,
TRUE ~ RCI_ind_preSD
)
)
temp = EMA_30.30 %>%
count(RCI_ind_preSD_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
RCI_Int %>%
dplyr::rename(RCI_ind_preSD_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| RCI | RCI_ind_preSD_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| RCI < -1,96 | -1 | reliable Verbesserung | 37 | 37 |
| -1,96 <= RCI <= 1,96 | 0 | keine reliable Veränderung | 63 | 63 |
| RCI > 1,96 | 1 | reliable Verschlechterung | NA | NA |
EMA_30.30: RCI(ind) mit pooled SDs
EMA_30.30 = EMA_30.30 %>%
mutate(RCI_ind_pooledSD_klass = case_when(
RCI_ind_pooledSD < -1.96 ~ -1,
RCI_ind_pooledSD >= -1.96 & RCI_ind_pooledSD < 1.96 ~ 0,
RCI_ind_pooledSD > 1.96 ~ 1,
TRUE ~ RCI_ind_pooledSD
)
)
temp = EMA_30.30 %>%
count(RCI_ind_pooledSD_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
RCI_Int %>%
dplyr::rename(RCI_ind_pooledSD_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| RCI | RCI_ind_pooledSD_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| RCI < -1,96 | -1 | reliable Verbesserung | 28 | 28 |
| -1,96 <= RCI <= 1,96 | 0 | keine reliable Veränderung | 72 | 72 |
| RCI > 1,96 | 1 | reliable Verschlechterung | NA | NA |
EMA_5.5_Window: RCI(ind) nur mit Pre-SDs
EMA_5.5_Window = EMA_5.5_Window %>%
mutate(RCI_ind_preSD_klass = case_when(
RCI_ind_preSD < -1.96 ~ -1,
RCI_ind_preSD >= -1.96 & RCI_ind_preSD < 1.96 ~ 0,
RCI_ind_preSD > 1.96 ~ 1,
TRUE ~ RCI_ind_preSD
)
)
temp = EMA_5.5_Window %>%
count(RCI_ind_preSD_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
RCI_Int %>%
dplyr::rename(RCI_ind_preSD_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| RCI | RCI_ind_preSD_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| RCI < -1,96 | -1 | reliable Verbesserung | 39 | 39 |
| -1,96 <= RCI <= 1,96 | 0 | keine reliable Veränderung | 59 | 59 |
| RCI > 1,96 | 1 | reliable Verschlechterung | 2 | 2 |
EMA_5.5_Window: RCI(ind) mit pooled SDs
EMA_5.5_Window = EMA_5.5_Window %>%
mutate(RCI_ind_pooledSD_klass = case_when(
RCI_ind_pooledSD < -1.96 ~ -1,
RCI_ind_pooledSD >= -1.96 & RCI_ind_pooledSD < 1.96 ~ 0,
RCI_ind_pooledSD > 1.96 ~ 1,
TRUE ~ RCI_ind_pooledSD
)
)
temp = EMA_5.5_Window %>%
count(RCI_ind_pooledSD_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
RCI_Int %>%
dplyr::rename(RCI_ind_pooledSD_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| RCI | RCI_ind_pooledSD_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| RCI < -1,96 | -1 | reliable Verbesserung | 28 | 28 |
| -1,96 <= RCI <= 1,96 | 0 | keine reliable Veränderung | 71 | 71 |
| RCI > 1,96 | 1 | reliable Verschlechterung | 1 | 1 |
EMA_5.5_Days: RCI(ind) nur mit Pre-SDs
EMA_5.5_Days = EMA_5.5_Days %>%
mutate(RCI_ind_preSD_klass = case_when(
RCI_ind_preSD < -1.96 ~ -1,
RCI_ind_preSD >= -1.96 & RCI_ind_preSD < 1.96 ~ 0,
RCI_ind_preSD > 1.96 ~ 1,
TRUE ~ RCI_ind_preSD
)
)
temp = EMA_5.5_Days %>%
count(RCI_ind_preSD_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
RCI_Int %>%
dplyr::rename(RCI_ind_preSD_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| RCI | RCI_ind_preSD_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| RCI < -1,96 | -1 | reliable Verbesserung | 45 | 45 |
| -1,96 <= RCI <= 1,96 | 0 | keine reliable Veränderung | 53 | 53 |
| RCI > 1,96 | 1 | reliable Verschlechterung | 2 | 2 |
EMA_5.5_Days: RCI(ind) mit pooled SDs
EMA_5.5_Days = EMA_5.5_Days %>%
mutate(RCI_ind_pooledSD_klass = case_when(
RCI_ind_pooledSD < -1.96 ~ -1,
RCI_ind_pooledSD >= -1.96 & RCI_ind_pooledSD < 1.96 ~ 0,
RCI_ind_pooledSD > 1.96 ~ 1,
TRUE ~ RCI_ind_pooledSD
)
)
temp = EMA_5.5_Days %>%
count(RCI_ind_pooledSD_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
RCI_Int %>%
dplyr::rename(RCI_ind_pooledSD_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| RCI | RCI_ind_pooledSD_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| RCI < -1,96 | -1 | reliable Verbesserung | 33 | 33 |
| -1,96 <= RCI <= 1,96 | 0 | keine reliable Veränderung | 65 | 65 |
| RCI > 1,96 | 1 | reliable Verschlechterung | 2 | 2 |
\[
\bigl[ r_{xx} (X_{pre} - M_{pre}) + M_{pre} \bigr] \pm 2 \cdot S_{pre} \cdot \sqrt{1 - r_{xx}}
\]
\(r_{xx}\) = reliability of the measure, \(X_{pre}\) = individual´s raw score at pre-treatment, \(M_{pre}\) = mean of the sample at pre-treatment, \(S_{pre}\) = standard deviation of the sample at pre-treatment
Interpretation der Post-Ausprägung nach EN-Intervall-Methode
EN_Int = tibble(EN = c("PHQ POST < [EN-Intervall]","PHQ POST im [EN-Intervall]","PHQ POST > [EN-Intervall]"),
Klassifikation = c(-1,0,1), Interpretation = c("signifikante Verbesserung",
"keine signifikante Veränderung","signifikante Verschlechterung"))EN-Intervalle in EMA_30.30
EMA_30.30$EN_min = (EMA_5.5_Alpha * (EMA_30.30$PRE_Mean - mean(EMA_30.30$PRE_Mean)) + mean(EMA_30.30$PRE_Mean)) - 2 * mean(EMA_30.30$ind.pretestSD) * sqrt(1 - EMA_5.5_Alpha)
EMA_30.30$EN_max = (EMA_5.5_Alpha * (EMA_30.30$PRE_Mean - mean(EMA_30.30$PRE_Mean)) + mean(EMA_30.30$PRE_Mean)) + 2 * mean(EMA_30.30$ind.pretestSD) * sqrt(1 - EMA_5.5_Alpha)
EMA_30.30 = EMA_30.30 %>%
mutate(EN_klass = case_when(
POST_Mean > EN_max ~ 1,
POST_Mean < EN_max & POST_Mean > EN_min ~ 0,
POST_Mean < EN_min ~ -1,
TRUE ~ POST_Mean
)
)
temp = EMA_30.30 %>%
count(EN_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
EN_Int %>%
dplyr::rename(EN_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| EN | EN_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| PHQ POST < [EN-Intervall] | -1 | signifikante Verbesserung | 46 | 46 |
| PHQ POST im [EN-Intervall] | 0 | keine signifikante Veränderung | 54 | 54 |
| PHQ POST > [EN-Intervall] | 1 | signifikante Verschlechterung | NA | NA |
EN-Intervalle in EMA_5.5_Window
EMA_5.5_Window$EN_min = (EMA_5.5_Alpha * (EMA_5.5_Window$PRE_Mean - mean(EMA_5.5_Window$PRE_Mean)) +
mean(EMA_5.5_Window$PRE_Mean)) - 2 * mean(EMA_5.5_Window$ind.pretestSD) * sqrt(1 - EMA_5.5_Alpha)
EMA_5.5_Window$EN_max = (EMA_5.5_Alpha * (EMA_5.5_Window$PRE_Mean - mean(EMA_5.5_Window$PRE_Mean)) +
mean(EMA_5.5_Window$PRE_Mean)) + 2 * mean(EMA_5.5_Window$ind.pretestSD) * sqrt(1 - EMA_5.5_Alpha)
EMA_5.5_Window = EMA_5.5_Window %>%
mutate(EN_klass = case_when(
POST_Mean > EN_max ~ 1,
POST_Mean < EN_max & POST_Mean > EN_min ~ 0,
POST_Mean < EN_min ~ -1,
TRUE ~ POST_Mean
)
)
temp = EMA_5.5_Window %>%
count(EN_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
EN_Int %>%
dplyr::rename(EN_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| EN | EN_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| PHQ POST < [EN-Intervall] | -1 | signifikante Verbesserung | 46 | 46 |
| PHQ POST im [EN-Intervall] | 0 | keine signifikante Veränderung | 53 | 53 |
| PHQ POST > [EN-Intervall] | 1 | signifikante Verschlechterung | 1 | 1 |
EN-Intervalle in EMA_5.5_Days
EMA_5.5_Days$EN_min = (EMA_5.5_Alpha * (EMA_5.5_Days$PRE_Mean - mean(EMA_5.5_Days$PRE_Mean)) +
mean(EMA_5.5_Days$PRE_Mean)) - 2 * mean(EMA_5.5_Days$ind.pretestSD) * sqrt(1 - EMA_5.5_Alpha)
EMA_5.5_Days$EN_max = (EMA_5.5_Alpha * (EMA_5.5_Days$PRE_Mean - mean(EMA_5.5_Days$PRE_Mean)) +
mean(EMA_5.5_Days$PRE_Mean)) + 2 * mean(EMA_5.5_Days$ind.pretestSD) * sqrt(1 - EMA_5.5_Alpha)
EMA_5.5_Days = EMA_5.5_Days %>%
mutate(EN_klass = case_when(
POST_Mean > EN_max ~ 1,
POST_Mean < EN_max & POST_Mean > EN_min ~ 0,
POST_Mean < EN_min ~ -1,
TRUE ~ POST_Mean
)
)
temp = EMA_5.5_Days %>%
count(EN_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
EN_Int %>%
dplyr::rename(EN_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| EN | EN_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| PHQ POST < [EN-Intervall] | -1 | signifikante Verbesserung | 54 | 54 |
| PHQ POST im [EN-Intervall] | 0 | keine signifikante Veränderung | 44 | 44 |
| PHQ POST > [EN-Intervall] | 1 | signifikante Verschlechterung | 2 | 2 |
Clinically Significant Improvement (CSI) vom Pre- zum Post-Intervall
“The original validation study of the PHQ-9 defined clinically significant improvement as [a pre-treatment score >= 10 and] a post-treatment score of <= 9 combined with improvement of 50%.” (McMillan, Gilbody, & Richards, 2010)
CSI_Int = tibble(CSI = c("Pre-Score >= 10 & Post-Score <= 9 & PC >= 50", "every other combination",
"Pre-Score <= 9 & Post-Score >= 10 & PC <= -50"),
Klassifikation = c(-1,0,1),
Interpretation = c("klinisch signifikante Verbesserung", "keine klinisch signifikante Veränderung",
"klinisch signifikante Verschlechterung"))EMA_30.30 = EMA_30.30 %>%
mutate(CSI_klass = case_when(
PRE_Mean >= 10 & POST_Mean <= 9 & Mean_PC >= 50 ~ -1,
PRE_Mean <= 9 & POST_Mean >= 10 & Mean_PC <= -50 ~ 1,
TRUE ~ 0
)
)
temp = EMA_30.30 %>%
count(CSI_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
CSI_Int %>%
dplyr::rename(CSI_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| CSI | CSI_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| Pre-Score >= 10 & Post-Score <= 9 & PC >= 50 | -1 | klinisch signifikante Verbesserung | 19 | 19 |
| every other combination | 0 | keine klinisch signifikante Veränderung | 81 | 81 |
| Pre-Score <= 9 & Post-Score >= 10 & PC <= -50 | 1 | klinisch signifikante Verschlechterung | NA | NA |
EMA_5.5_Window = EMA_5.5_Window %>%
mutate(CSI_klass = case_when(
PRE_Mean >= 10 & POST_Mean <= 9 & Mean_PC >= 50 ~ -1,
PRE_Mean <= 9 & POST_Mean >= 10 & Mean_PC <= -50 ~ 1,
TRUE ~ 0
)
)
temp = EMA_5.5_Window %>%
count(CSI_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
CSI_Int %>%
dplyr::rename(CSI_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| CSI | CSI_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| Pre-Score >= 10 & Post-Score <= 9 & PC >= 50 | -1 | klinisch signifikante Verbesserung | 24 | 24 |
| every other combination | 0 | keine klinisch signifikante Veränderung | 75 | 75 |
| Pre-Score <= 9 & Post-Score >= 10 & PC <= -50 | 1 | klinisch signifikante Verschlechterung | 1 | 1 |
EMA_5.5_Days = EMA_5.5_Days %>%
mutate(CSI_klass = case_when(
PRE_Mean >= 10 & POST_Mean <= 9 & Mean_PC >= 50 ~ -1,
PRE_Mean <= 9 & POST_Mean >= 10 & Mean_PC <= -50 ~ 1,
TRUE ~ 0
)
)
temp = EMA_5.5_Days %>%
count(CSI_klass) %>%
mutate(Percentage = round(((n / sum(n)) * 100), digits = 2))
CSI_Int %>%
dplyr::rename(CSI_klass = Klassifikation) %>%
full_join(., temp) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| CSI | CSI_klass | Interpretation | n | Percentage |
|---|---|---|---|---|
| Pre-Score >= 10 & Post-Score <= 9 & PC >= 50 | -1 | klinisch signifikante Verbesserung | 23 | 23 |
| every other combination | 0 | keine klinisch signifikante Veränderung | 75 | 75 |
| Pre-Score <= 9 & Post-Score >= 10 & PC <= -50 | 1 | klinisch signifikante Verschlechterung | 2 | 2 |
Sudden Gain/Loss-Klassifikation vom Pre- zum Post-Intervall mithilfe des R-Packages “suddengains”
3 Kriterien nach Tang & DeRubeis (1999): bedeutende absolute Veränderung: Über-/Unterschreitung eines definierten Cutoff-Scores (z.B. RCI), hier PHQ-9-Score <= 9 bedeutende relative Veränderung: Reduktion/Zuwachs von Pre zu Post um >= 25% bedeutende Veränderung relativ zur Symptom-Fluktuation:
\[ M_{pre} - M_{post} > \text{critical value} \cdot \sqrt{\frac{\left(n_{pre} - 1 \right) \cdot SD^2_{pre} + \left(n_{post} - 1 \right) \cdot SD^2_{post}} {n_{pre} + n_{post} - 2}} \]
\(M_{pre}\) = mean of the subject´s scores before a potential gain/loss, \(M_{post}\) = mean of the subject´s scores after a potential gain/loss, \(\text{critical value}\) = 2.776 = two-tailed t statistic for \(\alpha\) = 0.05 and df = 4, \(n_{pre}\) = number of measurement points before a potential gain/loss, \(n_{post}\) = number of measurement points after a potential gain/loss, \(SD^2_{pre}\) = standard deviation of the subject´s scores before a potential gain/loss, \(SD^2_{post}\) = standard deviation of the subject´s scores after a potential gain/loss
SG_Int = tibble(SG = c("PHQ-9 Post-Mean <= 9 & (Mean) PC >= 25 & Mean Diff. > (absolute) critical fluctuation",
"every other combination of conditions",
"PHQ-9 Post-Mean > 9 & (Mean) PC <= -25 & Mean Diff. > (absolute) critical fluctuation"),
Klassifikation = c(-1,0,1),
Interpretation = c("sudden gain", "no sudden change", "sudden loss"))Übereinstimmung der Klassifikationen auf individueller Ebene zwischen EMA_30.30, EMA_5.5_Window und EMA_5.5_Days
Interpretation von Cohen´s Kappa:
tibble(Cohen_Kappa = c("k < .20",".21 <= k < .40",".41 <= k < .60",".61 <= k < .80","k > .80"),
Interpretation = c("poor","fair","moderate","good","very good")) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| Cohen_Kappa | Interpretation |
|---|---|
| k < .20 | poor |
| .21 <= k < .40 | fair |
| .41 <= k < .60 | moderate |
| .61 <= k < .80 | good |
| k > .80 | very good |
Übereinstimmung zwischen den klinischen Interpretationen der PHQ-9-Werte für Pre- und Post-Intervalle (je 30 MZP und je 5 MZP):
# PRE
x = EMA_30.30 %>%
select(ID, PRE_Mean_klass) %>%
dplyr::rename(PRE_klass_30.30 = PRE_Mean_klass)
y = EMA_5.5_Window %>%
select(ID, PRE_Mean_klass) %>%
dplyr::rename(PRE_klass_5.5_Window = PRE_Mean_klass)
z = EMA_5.5_Days %>%
select(ID, PRE_Mean_klass) %>%
dplyr::rename(PRE_klass_5.5_Days = PRE_Mean_klass)
temp = full_join(x, y, by = "ID") %>%
full_join(., z, by = "ID") %>%
select(-ID) %>%
mutate(across(.cols = everything(), as.factor))
### Cohen´s Kappa
rnames = c("PRE_klass_30.30", "PRE_klass_5.5_Window", "PRE_klass_5.5_Days")
Agreement = matrix(ncol = 3, nrow = 3, dimnames = list(rnames, rnames))
for (i in 1:nrow(Agreement)) {
for (j in 1:ncol(Agreement)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
y = eval(parse(text = paste0("temp$", names(temp[,j]))))
Agreement[i,j] = CohenKappa(x = x, y = y)
}
}
# mit plot.matrix::...
par(mar = c(5.1, 4.1, 4.1, 4.1)) # default c(5.1, 4.1, 4.1, 2.1)
plot(Agreement, col = heat.colors(n=5, rev=TRUE), fmt.cell = "%.2f", cex.axis = 0.7, cex = 0.8, las = 2,
key = list(cex.axis=0.7), ann = FALSE, breaks = c(0, 0.21, 0.41, 0.61, 0.81, 1));
title(main = "Übereinstimmung (Cohen´s Kappa) der PHQ-PRE-Klassifikationen")# POST
x = EMA_30.30 %>%
select(ID, POST_Mean_klass) %>%
dplyr::rename(POST_klass_30.30 = POST_Mean_klass)
y = EMA_5.5_Window %>%
select(ID, POST_Mean_klass) %>%
dplyr::rename(POST_klass_5.5_Window = POST_Mean_klass)
z = EMA_5.5_Days %>%
select(ID, POST_Mean_klass) %>%
dplyr::rename(POST_klass_5.5_Days = POST_Mean_klass)
temp = full_join(x, y, by = "ID") %>%
full_join(., z, by = "ID") %>%
select(-ID) %>%
mutate(across(.cols = everything(), as.factor))
### Cohen´s Kappa
rnames = c("POST_klass_30.30", "POST_klass_5.5_Window", "POST_klass_5.5_Days")
Agreement = matrix(ncol = 3, nrow = 3, dimnames = list(rnames, rnames))
for (i in 1:nrow(Agreement)) {
for (j in 1:ncol(Agreement)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
y = eval(parse(text = paste0("temp$", names(temp[,j]))))
Agreement[i,j] = CohenKappa(x = x, y = y)
}
}
# mit plot.matrix::...
par(mar = c(5.1, 4.1, 4.1, 4.1)) # default c(5.1, 4.1, 4.1, 2.1)
plot(Agreement, col = heat.colors(n=5, rev=TRUE), fmt.cell = "%.2f", cex.axis = 0.7, cex = 0.8, las = 2,
key = list(cex.axis=0.7), ann = FALSE, breaks = c(0, 0.21, 0.41, 0.61, 0.81, 1));
title(main = "Übereinstimmung (Cohen´s Kappa) der PHQ-POST-Klassifikationen")# einheitliche Kodierung von Verbesserung (-1), keiner Veränderung (0) und Verschlechterung (1):
x = EMA_30.30 %>%
select(ID, Mean_PC_klass, RCI_ind_preSD_klass, RCI_ind_pooledSD_klass, EN_klass, CSI_klass) %>%
dplyr::rename(Mean_PC_30.30 = Mean_PC_klass, RCI_ind_preSD_30.30 = RCI_ind_preSD_klass,
RCI_ind_pooledSD_30.30 = RCI_ind_pooledSD_klass, EN_30.30 = EN_klass, CSI_30.30 = CSI_klass) %>%
mutate(Mean_PC_30.30 = recode(Mean_PC_30.30, '-2' = 1L, '-1' = 0L, '0' = 0L, '1' = 0L, '2' = -1L))
y = EMA_5.5_Window %>%
select(ID, Mean_PC_klass, RCI_ind_preSD_klass, RCI_ind_pooledSD_klass, EN_klass, CSI_klass) %>%
dplyr::rename(Mean_PC_5.5_Window = Mean_PC_klass, RCI_ind_preSD_5.5_Window = RCI_ind_preSD_klass,
RCI_ind_pooledSD_5.5_Window = RCI_ind_pooledSD_klass, EN_5.5_Window = EN_klass, CSI_5.5_Window = CSI_klass) %>%
mutate(Mean_PC_5.5_Window = recode(Mean_PC_5.5_Window, '-2' = 1L, '-1' = 0L, '0' = 0L, '1' = 0L, '2' = -1L))
z = EMA_5.5_Days %>%
select(ID, Mean_PC_klass, RCI_ind_preSD_klass, RCI_ind_pooledSD_klass, EN_klass, CSI_klass) %>%
dplyr::rename(Mean_PC_5.5_Days = Mean_PC_klass, RCI_ind_preSD_5.5_Days = RCI_ind_preSD_klass,
RCI_ind_pooledSD_5.5_Days = RCI_ind_pooledSD_klass, EN_5.5_Days = EN_klass, CSI_5.5_Days = CSI_klass) %>%
mutate(Mean_PC_5.5_Days = recode(Mean_PC_5.5_Days, '-2' = 1L, '-1' = 0L, '0' = 0L, '1' = 0L, '2' = -1L))
temp = full_join(x, y, by = "ID") %>%
full_join(., z, "ID") %>%
select(-ID) %>%
dplyr::mutate(across(.cols = everything(), as.factor))
rnames = names(temp)
#view(dfSummary(temp))
#dfSummary(temp, plain.ascii = FALSE, style = 'grid', graph.magnif = 0.75, valid.col = FALSE, tmp.img.dir = "/tmp")
#dfSummary(temp)
print(dfSummary(temp, varnumbers = FALSE, plain.ascii = FALSE, style = 'grid', graph.magnif = 0.75, valid.col = FALSE, na.col = FALSE, display.labels = FALSE, silent = FALSE, headers = FALSE, footnote = NA, tmp.img.dir = "/tmp"), method = 'render')| Variable | Stats / Values | Freqs (% of Valid) | Graph | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Mean_PC_30.30 [factor] | 1. -1 2. 0 |
|
|||||||||||||
| RCI_ind_preSD_30.30 [factor] | 1. -1 2. 0 |
|
|||||||||||||
| RCI_ind_pooledSD_30.30 [factor] | 1. -1 2. 0 |
|
|||||||||||||
| EN_30.30 [factor] | 1. -1 2. 0 |
|
|||||||||||||
| CSI_30.30 [factor] | 1. -1 2. 0 |
|
|||||||||||||
| Mean_PC_5.5_Window [factor] | 1. -1 2. 0 3. 1 |
|
|||||||||||||
| RCI_ind_preSD_5.5_Window [factor] | 1. -1 2. 0 3. 1 |
|
|||||||||||||
| RCI_ind_pooledSD_5.5_Window [factor] | 1. -1 2. 0 3. 1 |
|
|||||||||||||
| EN_5.5_Window [factor] | 1. -1 2. 0 3. 1 |
|
|||||||||||||
| CSI_5.5_Window [factor] | 1. -1 2. 0 3. 1 |
|
|||||||||||||
| Mean_PC_5.5_Days [factor] | 1. -1 2. 0 3. 1 |
|
|||||||||||||
| RCI_ind_preSD_5.5_Days [factor] | 1. -1 2. 0 3. 1 |
|
|||||||||||||
| RCI_ind_pooledSD_5.5_Days [factor] | 1. -1 2. 0 3. 1 |
|
|||||||||||||
| EN_5.5_Days [factor] | 1. -1 2. 0 3. 1 |
|
|||||||||||||
| CSI_5.5_Days [factor] | 1. -1 2. 0 3. 1 |
|
Generated by summarytools 0.9.6 (R version 4.0.2)
2020-10-30
Gesamt-Übereinstimmung
### Cohen´s Kappa
Agreement = matrix(ncol = 15, nrow = 15, dimnames = list(rnames, rnames))
for (i in 1:nrow(Agreement)) {
for (j in 1:ncol(Agreement)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
y = eval(parse(text = paste0("temp$", names(temp[,j]))))
Agreement[i,j] = CohenKappa(x = x, y = y)
}
}
# mit plot.matrix::...
par(mar = c(5.1, 4.1, 4.1, 4.1)) # default c(5.1, 4.1, 4.1, 2.1)
plot(Agreement, col = heat.colors(n=5, rev=TRUE), fmt.cell = "%.2f", cex.axis = 0.5, cex = 0.7, las = 2,
key = list(cex.axis=0.6), ann = FALSE, breaks = c(0, 0.21, 0.41, 0.61, 0.81, 1));
title(main = "Übereinstimmung (Cohen´s Kappa) der Klassifikationen")### Prozentuale Übereinstimmung
Percentage_Agreement = matrix(ncol = 15, nrow = 15, dimnames = list(rnames, rnames))
for (i in 1:nrow(Percentage_Agreement)) {
for (j in 1:ncol(Percentage_Agreement)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
y = eval(parse(text = paste0("temp$", names(temp[,j]))))
Percentage_Agreement[i,j] = Agree(cbind(x, y))[1]
}
}
# mit plot.matrix::...
par(mar = c(5.1, 4.1, 4.1, 4.1)) # default c(5.1, 4.1, 4.1, 2.1)
plot(Percentage_Agreement, col = heat.colors(n=4, rev=TRUE), fmt.cell = "%.2f", cex.axis = 0.5, cex = 0.7, las = 2,
key = list(cex.axis=0.6), ann = FALSE, breaks = c(0, 0.26, 0.51, 0.76, 1));
title(main = "Prozentuale Übereinstimmung der Klassifikationen")Übereinstimmung nur für Verbesserung (-1)
### Cohen´s Kappa
Agreement = matrix(ncol = 15, nrow = 15, dimnames = list(rnames, rnames))
for (i in 1:nrow(Agreement)) {
for (j in 1:ncol(Agreement)) {
x = eval(parse(text = paste0("temp$", names(temp[,i])))) %>%
dplyr::recode_factor(., '-1' = -1L)
y = eval(parse(text = paste0("temp$", names(temp[,j])))) %>%
dplyr::recode_factor(., '-1' = -1L)
Agreement[i,j] = CohenKappa(x = x, y = y, useNA = "ifany")
}
}
# mit plot.matrix::...
par(mar = c(5.1, 4.1, 4.1, 4.1)) # default c(5.1, 4.1, 4.1, 2.1)
plot(Agreement, col = heat.colors(n=5, rev=TRUE), fmt.cell = "%.2f", cex.axis = 0.5, cex = 0.7, las = 2,
key = list(cex.axis=0.6), ann = FALSE, breaks = c(0, 0.21, 0.41, 0.61, 0.81, 1));
title(main = "Übereinstimmung (Cohen´s Kappa): Verbesserung (-1)")### Prozentuale Übereinstimmung
Percentage_Agreement = matrix(ncol = 15, nrow = 15, dimnames = list(rnames, rnames))
for (i in 1:nrow(Percentage_Agreement)) {
for (j in 1:ncol(Percentage_Agreement)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
y = eval(parse(text = paste0("temp$", names(temp[,j]))))
Percentage_Agreement[i,j] = length(which(x == -1L & y == -1L)) /
length(which(x == -1L | y == -1L))
}
}
# mit plot.matrix::...
par(mar = c(5.1, 4.1, 4.1, 4.1)) # default c(5.1, 4.1, 4.1, 2.1)
plot(Percentage_Agreement, col = heat.colors(n=4, rev=TRUE), fmt.cell = "%.2f", cex.axis = 0.5, cex = 0.7, las = 2,
key = list(cex.axis=0.6), ann = FALSE, breaks = c(0, 0.26, 0.51, 0.76, 1));
title(main = "Prozentuale Übereinstimmung: Verbesserung (-1)")Übereinstimmung nur für Verschlechterung (1)
### Cohen´s Kappa
Agreement = matrix(ncol = 15, nrow = 15, dimnames = list(rnames, rnames))
for (i in 1:nrow(Agreement)) {
for (j in 1:ncol(Agreement)) {
x = eval(parse(text = paste0("temp$", names(temp[,i])))) %>%
recode_factor(., '1' = 1L)
y = eval(parse(text = paste0("temp$", names(temp[,j])))) %>%
recode_factor(., '1' = 1L)
Agreement[i,j] = CohenKappa(x = x, y = y, useNA = "ifany")
}
}
# mit plot.matrix::...
par(mar = c(5.1, 4.1, 4.1, 4.1)) # default c(5.1, 4.1, 4.1, 2.1)
plot(Agreement, col = heat.colors(n=5, rev=TRUE), fmt.cell = "%.2f", cex.axis = 0.5, cex = 0.7, las = 2,
key = list(cex.axis=0.6), ann = FALSE, breaks = c(0, 0.21, 0.41, 0.61, 0.81, 1));
title(main = "Übereinstimmung (Cohen´s Kappa): Verschlechterung (1)")### Prozentuale Übereinstimmung
Percentage_Agreement = matrix(ncol = 15, nrow = 15, dimnames = list(rnames, rnames))
for (i in 1:nrow(Percentage_Agreement)) {
for (j in 1:ncol(Percentage_Agreement)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
y = eval(parse(text = paste0("temp$", names(temp[,j]))))
Percentage_Agreement[i,j] = length(which(x == 1L & y == 1L)) /
length(which(x == 1L | y == 1L))
}
}
# mit plot.matrix::...
par(mar = c(5.1, 4.1, 4.1, 4.1)) # default c(5.1, 4.1, 4.1, 2.1)
plot(Percentage_Agreement, col = heat.colors(n=4, rev=TRUE), fmt.cell = "%.2f", cex.axis = 0.5, cex = 0.7, las = 2,
key = list(cex.axis=0.6), ann = FALSE, breaks = c(0, 0.26, 0.51, 0.76, 1));
title(main = "Prozentuale Übereinstimmung: Verschlechterung (1)")Diagnostische Sensitivität und Spezifität einer “neuen” Testmethode im Vergleich zu einer “Goldstandard”-Testmethode:
Sensitivität = Wahrscheinlichkeit für ein richtig-positives Testergebnis
Spezifität = Wahrscheinlichkeit für ein richtig-negatives Testergebnis
\[ Sensitivity = \frac{\sum{\text{True Positives}}} {\sum{\text{True Positives}} + \sum{\text{False Negatives}}} \]
\[ Specificity = \frac{\sum{\text{True Negatives}}} {\sum{\text{True Negatives}} + \sum{\text{False Positives}}} \]
Sensitivität & Spezifität gegenüber Veränderung:
Absolute Häufigkeiten der Veränderungs-Klassifikationen (verändert vs. nicht verändert) der Klassifikationsmethoden im Vergleich zur klinischen Signifikanz CSI (je 30 MZP) als “Goldstandard”:
SenSpez = tibble(Method = colnames(temp),
n_Changed = as.integer(NA),
n_Unchanged = as.integer(NA),
Total = as.integer(NA),
Sensitivity = as.numeric(NA),
Specificity = as.numeric(NA))
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"n_Changed"] = temp %>% summarise(., sum(x %in% c(-1,1))) %>% as.integer()
}
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"n_Unchanged"] = temp %>% summarise(., sum(x == 0)) %>% as.integer()
}
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"Total"] = temp %>% summarise(., sum(!is.na(x))) %>% as.integer()
}
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"Sensitivity"] = sum(x %in% c(-1,1) & temp$CSI_30.30 %in% c(-1,1)) /
(sum(x %in% c(-1,1) & temp$CSI_30.30 %in% c(-1,1)) + sum(x == 0 & temp$CSI_30.30 %in% c(-1,1)))
}
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"Specificity"] = sum(x == 0 & temp$CSI_30.30 == 0) /
(sum(x == 0 & temp$CSI_30.30 == 0) + sum(x %in% c(-1,1) & temp$CSI_30.30 == 0))
}
SenSpez$Sensitivity = round(SenSpez$Sensitivity, digits = 3)
SenSpez$Specificity = round(SenSpez$Specificity, digits = 3)
SenSpez %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| Method | n_Changed | n_Unchanged | Total | Sensitivity | Specificity |
|---|---|---|---|---|---|
| Mean_PC_30.30 | 23 | 77 | 100 | 1.000 | 0.951 |
| RCI_ind_preSD_30.30 | 37 | 63 | 100 | 0.947 | 0.765 |
| RCI_ind_pooledSD_30.30 | 28 | 72 | 100 | 1.000 | 0.889 |
| EN_30.30 | 46 | 54 | 100 | 1.000 | 0.667 |
| CSI_30.30 | 19 | 81 | 100 | 1.000 | 1.000 |
| Mean_PC_5.5_Window | 28 | 72 | 100 | 0.895 | 0.864 |
| RCI_ind_preSD_5.5_Window | 41 | 59 | 100 | 0.895 | 0.704 |
| RCI_ind_pooledSD_5.5_Window | 29 | 71 | 100 | 0.895 | 0.852 |
| EN_5.5_Window | 47 | 53 | 100 | 1.000 | 0.654 |
| CSI_5.5_Window | 25 | 75 | 100 | 0.842 | 0.889 |
| Mean_PC_5.5_Days | 31 | 69 | 100 | 0.895 | 0.827 |
| RCI_ind_preSD_5.5_Days | 47 | 53 | 100 | 0.895 | 0.630 |
| RCI_ind_pooledSD_5.5_Days | 35 | 65 | 100 | 0.947 | 0.790 |
| EN_5.5_Days | 56 | 44 | 100 | 1.000 | 0.543 |
| CSI_5.5_Days | 25 | 75 | 100 | 0.842 | 0.889 |
graphics::barplot(SenSpez$Sensitivity ~ SenSpez$Method, col = "dodgerblue", las = 2, cex.names = 0.7,
main = "Sensitivity to Change (Improvement & Deterioration)")
graphics::barplot(SenSpez$Specificity ~ SenSpez$Method, col = "dodgerblue", las = 2, cex.names = 0.7,
main = "Specificity to Change (Improvement & Deterioration)")Sensitivität & Spezifität gegenüber Verbesserung:
Absolute Häufigkeiten der Veränderungs-Klassifikationen (verbessert vs. nicht verbessert) der Klassifikationsmethoden im Vergleich zur klinischen Signifikanz CSI (je 30 MZP) als “Goldstandard”:
SenSpez = tibble(Method = colnames(temp),
n_Improved = as.integer(NA),
n_NotImproved = as.integer(NA),
Total = as.integer(NA),
Sensitivity_Imp = as.numeric(NA),
Specificity_Imp = as.numeric(NA))
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"n_Improved"] = temp %>% summarise(., sum(x == -1)) %>% as.integer()
}
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"n_NotImproved"] = temp %>% summarise(., sum(x %in% c(-1,1))) %>% as.integer()
}
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"Total"] = temp %>% summarise(., sum(!is.na(x))) %>% as.integer()
}
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"Sensitivity_Imp"] = sum(x == -1 & temp$CSI_30.30 == -1) /
(sum(x == -1 & temp$CSI_30.30 == -1) + sum(x %in% c(0,1) & temp$CSI_30.30 == -1))
}
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"Specificity_Imp"] = sum(x %in% c(0,1) & temp$CSI_30.30 %in% c(0,1)) /
(sum(x %in% c(0,1) & temp$CSI_30.30 %in% c(0,1)) + sum(x == -1 & temp$CSI_30.30 %in% c(0,1)))
}
SenSpez$Sensitivity_Imp = round(SenSpez$Sensitivity_Imp, digits = 3)
SenSpez$Specificity_Imp = round(SenSpez$Specificity_Imp, digits = 3)
SenSpez %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| Method | n_Improved | n_NotImproved | Total | Sensitivity_Imp | Specificity_Imp |
|---|---|---|---|---|---|
| Mean_PC_30.30 | 23 | 23 | 100 | 1.000 | 0.951 |
| RCI_ind_preSD_30.30 | 37 | 37 | 100 | 0.947 | 0.765 |
| RCI_ind_pooledSD_30.30 | 28 | 28 | 100 | 1.000 | 0.889 |
| EN_30.30 | 46 | 46 | 100 | 1.000 | 0.667 |
| CSI_30.30 | 19 | 19 | 100 | 1.000 | 1.000 |
| Mean_PC_5.5_Window | 26 | 28 | 100 | 0.895 | 0.889 |
| RCI_ind_preSD_5.5_Window | 39 | 41 | 100 | 0.895 | 0.728 |
| RCI_ind_pooledSD_5.5_Window | 28 | 29 | 100 | 0.895 | 0.864 |
| EN_5.5_Window | 46 | 47 | 100 | 1.000 | 0.667 |
| CSI_5.5_Window | 24 | 25 | 100 | 0.842 | 0.901 |
| Mean_PC_5.5_Days | 29 | 31 | 100 | 0.895 | 0.852 |
| RCI_ind_preSD_5.5_Days | 45 | 47 | 100 | 0.895 | 0.654 |
| RCI_ind_pooledSD_5.5_Days | 33 | 35 | 100 | 0.947 | 0.815 |
| EN_5.5_Days | 54 | 56 | 100 | 1.000 | 0.568 |
| CSI_5.5_Days | 23 | 25 | 100 | 0.842 | 0.914 |
graphics::barplot(SenSpez$Sensitivity_Imp ~ SenSpez$Method, col = "dodgerblue", las = 2, cex.names = 0.7,
main = "Sensitivity to Improvement")
graphics::barplot(SenSpez$Specificity_Imp ~ SenSpez$Method, col = "dodgerblue", las = 2, cex.names = 0.7,
main = "Specificity to Improvement")Sensitivität & Spezifität gegenüber Verschlechterung:
Absolute Häufigkeiten der Veränderungs-Klassifikationen (verschlechtert vs. nicht verschlechtert) der Klassifikationsmethoden im Vergleich zur klinischen Signifikanz CSI (je 30 MZP) als “Goldstandard”:
SenSpez = tibble(Method = colnames(temp),
n_Deteriorated = as.integer(NA),
n_NotDeteriorated = as.integer(NA),
Total = as.integer(NA),
Sensitivity_Det = as.numeric(NA),
Specificity_Det = as.numeric(NA))
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"n_Deteriorated"] = temp %>% summarise(., sum(x == 1)) %>% as.integer()
}
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"n_NotDeteriorated"] = temp %>% summarise(., sum(x %in% c(-1,0))) %>% as.integer()
}
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"Total"] = temp %>% summarise(., sum(!is.na(x))) %>% as.integer()
}
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"Sensitivity_Det"] = sum(x == 1 & temp$CSI_30.30 == 1) /
(sum(x == 1 & temp$CSI_30.30 == 1) + sum(x %in% c(-1,0) & temp$CSI_30.30 == 1))
}
for (i in 1:nrow(SenSpez)) {
x = eval(parse(text = paste0("temp$", names(temp[,i]))))
SenSpez[i,"Specificity_Det"] = sum(x %in% c(-1,0) & temp$CSI_30.30 %in% c(-1,0)) /
(sum(x %in% c(-1,0) & temp$CSI_30.30 %in% c(-1,0)) + sum(x == 1 & temp$CSI_30.30 %in% c(-1,0)))
}
SenSpez$Sensitivity_Det = round(SenSpez$Sensitivity_Det, digits = 3)
SenSpez$Specificity_Det = round(SenSpez$Specificity_Det, digits = 3)
SenSpez %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = FALSE)| Method | n_Deteriorated | n_NotDeteriorated | Total | Sensitivity_Det | Specificity_Det |
|---|---|---|---|---|---|
| Mean_PC_30.30 | 0 | 100 | 100 | NaN | 1.00 |
| RCI_ind_preSD_30.30 | 0 | 100 | 100 | NaN | 1.00 |
| RCI_ind_pooledSD_30.30 | 0 | 100 | 100 | NaN | 1.00 |
| EN_30.30 | 0 | 100 | 100 | NaN | 1.00 |
| CSI_30.30 | 0 | 100 | 100 | NaN | 1.00 |
| Mean_PC_5.5_Window | 2 | 98 | 100 | NaN | 0.98 |
| RCI_ind_preSD_5.5_Window | 2 | 98 | 100 | NaN | 0.98 |
| RCI_ind_pooledSD_5.5_Window | 1 | 99 | 100 | NaN | 0.99 |
| EN_5.5_Window | 1 | 99 | 100 | NaN | 0.99 |
| CSI_5.5_Window | 1 | 99 | 100 | NaN | 0.99 |
| Mean_PC_5.5_Days | 2 | 98 | 100 | NaN | 0.98 |
| RCI_ind_preSD_5.5_Days | 2 | 98 | 100 | NaN | 0.98 |
| RCI_ind_pooledSD_5.5_Days | 2 | 98 | 100 | NaN | 0.98 |
| EN_5.5_Days | 2 | 98 | 100 | NaN | 0.98 |
| CSI_5.5_Days | 2 | 98 | 100 | NaN | 0.98 |
#graphics::barplot(SenSpez$Sensitivity_Det ~ SenSpez$Method, col = "dodgerblue", las = 2, cex.names = 0.7,
# main = "Sensitivity to Deterioration")
graphics::barplot(SenSpez$Specificity_Det ~ SenSpez$Method, col = "dodgerblue", las = 2, cex.names = 0.7,
main = "Specificity to Deterioration")Statt wenige zufällige MZP-Kombinationen zu ziehen und diese dann mit den “wahren” Schätzwerten und Klassifikationen (= berechnet anhand der gesamten Intervalle mit je 30 MZP) zu vergleichen, sollen die empirische Verteilung der Parameter und somit der Schätzfehler über Resampling-Methoden wie Jackknife-Verfahren und Bootstrapping berechnet werden.
Percentage Change (PC)
###### EMA_30.30
n = 30
Mean_PC = function(x, ID_df) {(1-((mean(ID_df[x,2])) / (mean(ID_df[x,1])))) * 100}
for (i in 1:nrow(EMA_30.30)) {
df = data.frame(PRE = as.numeric(EMA_30.30[i,pre_30mzp]), POST = as.numeric(EMA_30.30[i,post_30mzp]))
EMA_30.30[i,"Mean_PC_jse"] = jackknife(1:n, Mean_PC, df)$jack.se
EMA_30.30[i,"Mean_PC_jbias"] = jackknife(1:n, Mean_PC, df)$jack.bias
message(i)
}
EMA_30.30_Mean_PC_JK = EMA_30.30 %>%
select(ID, Mean_PC_jse, Mean_PC_jbias)
save(EMA_30.30_Mean_PC_JK, file = "Jackknife/EMA_30.30_Mean_PC_JK_k20_n100.RData")
###### EMA_5.5_Window
n = 5
Mean_PC = function(x, ID_df) {(1-((mean(ID_df[x,2])) / (mean(ID_df[x,1])))) * 100}
for (i in 1:nrow(EMA_5.5_Window)) {
df = data.frame(PRE = as.numeric(EMA_5.5_Window[i,pre_5mzp]), POST = as.numeric(EMA_5.5_Window[i,post_5mzp]))
EMA_5.5_Window[i,"Mean_PC_jse"] = jackknife(1:n, Mean_PC, df)$jack.se
EMA_5.5_Window[i,"Mean_PC_jbias"] = jackknife(1:n, Mean_PC, df)$jack.bias
message(i)
}
EMA_5.5_Window_Mean_PC_JK = EMA_5.5_Window %>%
select(ID, Mean_PC_jse, Mean_PC_jbias)
save(EMA_5.5_Window_Mean_PC_JK, file = "Jackknife/EMA_5.5_Window_Mean_PC_JK_k20_n100.RData")
###### EMA_5.5_Days
n = 5
Mean_PC = function(x, ID_df) {(1-((mean(ID_df[x,2])) / (mean(ID_df[x,1])))) * 100}
for (i in 1:nrow(EMA_5.5_Days)) {
df = data.frame(PRE = as.numeric(EMA_5.5_Days[i,pre_5mzp]), POST = as.numeric(EMA_5.5_Days[i,post_5mzp]))
EMA_5.5_Days[i,"Mean_PC_jse"] = jackknife(1:n, Mean_PC, df)$jack.se
EMA_5.5_Days[i,"Mean_PC_jbias"] = jackknife(1:n, Mean_PC, df)$jack.bias
message(i)
}
EMA_5.5_Days_Mean_PC_JK = EMA_5.5_Days %>%
select(ID, Mean_PC_jse, Mean_PC_jbias)
save(EMA_5.5_Days_Mean_PC_JK, file = "Jackknife/EMA_5.5_Days_Mean_PC_JK_k20_n100.RData")load("Jackknife/EMA_30.30_Mean_PC_JK_k20_n100.RData")
load("Jackknife/EMA_5.5_Window_Mean_PC_JK_k20_n100.RData")
load("Jackknife/EMA_5.5_Days_Mean_PC_JK_k20_n100.RData")
EMA_30.30 = full_join(EMA_30.30, EMA_30.30_Mean_PC_JK, by = "ID")
EMA_5.5_Window = full_join(EMA_5.5_Window, EMA_5.5_Window_Mean_PC_JK, by = "ID")
EMA_5.5_Days = full_join(EMA_5.5_Days, EMA_5.5_Days_Mean_PC_JK, by = "ID")
temp = tibble(Jackknife_SE = c(EMA_30.30$Mean_PC_jse, EMA_5.5_Window$Mean_PC_jse, EMA_5.5_Days$Mean_PC_jse),
Datasets = rep(c("EMA_30.30", "EMA_5.5_Window", "EMA_5.5_Days"), each = length(EMA_30.30$Mean_PC_jse)))
temp %>%
ggplot(aes(x = Jackknife_SE, fill = Datasets)) +
geom_histogram(alpha = 0.2, binwidth = 1, position = "identity") +
labs(x = "Jackknife SE of Mean Percentage Change", y = "Cases")#ggplot(temp, aes(x = Datasets, y = Jackknife_SE)) +
# geom_boxplot(na.rm = TRUE) +
# ggtitle("Jackknife SEs") +
# xlab("Dataset")
temp = tibble(Jackknife_Bias = c(EMA_30.30$Mean_PC_jbias, EMA_5.5_Window$Mean_PC_jbias, EMA_5.5_Days$Mean_PC_jbias),
Datasets = rep(c("EMA_30.30", "EMA_5.5_Window", "EMA_5.5_Days"), each = length(EMA_30.30$Mean_PC_jbias)))
temp %>%
ggplot(aes(x = Jackknife_Bias, fill = Datasets)) +
geom_histogram(alpha = 0.2, binwidth = 1, position = "identity") +
labs(x = "Jackknife Bias of Mean Percentage Change", y = "Cases")#ggplot(temp, aes(x = Datasets, y = Jackknife_Bias)) +
# geom_boxplot(na.rm = TRUE) +
# ggtitle("Jackknife Biases") +
# xlab("Dataset")RCI(ind) nur mit SD aus dem individuellen Pre-Intervall
###### EMA_30.30
n = 30
RCI_ind_preSD = function(x, ID_df) {(mean(ID_df[x,2]) - mean(ID_df[x,1])) /
sqrt(2 * (sd(ID_df[x,1]) * sqrt(1 - EMA_5.5_Alpha))^2)}
for (i in 1:nrow(EMA_30.30)) {
df = data.frame(PRE = as.numeric(EMA_30.30[i,pre_30mzp]), POST = as.numeric(EMA_30.30[i,post_30mzp]))
EMA_30.30[i,"RCI_ind_preSD_jse"] = jackknife(1:n, RCI_ind_preSD, df)$jack.se
EMA_30.30[i,"RCI_ind_preSD_jbias"] = jackknife(1:n, RCI_ind_preSD, df)$jack.bias
message(i)
}
EMA_30.30_RCI_ind_preSD_JK = EMA_30.30 %>%
select(ID, RCI_ind_preSD_jse, RCI_ind_preSD_jbias)
save(EMA_30.30_RCI_ind_preSD_JK, file = "Jackknife/EMA_30.30_RCI_ind_preSD_JK_k20_n100.RData")
###### EMA_5.5_Window
n = 5
RCI_ind_preSD = function(x, ID_df) {(mean(ID_df[x,2]) - mean(ID_df[x,1])) /
sqrt(2 * (sd(ID_df[x,1]) * sqrt(1 - EMA_5.5_Alpha))^2)}
for (i in 1:nrow(EMA_5.5_Window)) {
df = data.frame(PRE = as.numeric(EMA_5.5_Window[i,pre_5mzp]), POST = as.numeric(EMA_5.5_Window[i,post_5mzp]))
EMA_5.5_Window[i,"RCI_ind_preSD_jse"] = jackknife(1:n, RCI_ind_preSD, df)$jack.se
EMA_5.5_Window[i,"RCI_ind_preSD_jbias"] = jackknife(1:n, RCI_ind_preSD, df)$jack.bias
message(i)
}
EMA_5.5_Window_RCI_ind_preSD_JK = EMA_5.5_Window %>%
select(ID, RCI_ind_preSD_jse, RCI_ind_preSD_jbias)
save(EMA_5.5_Window_RCI_ind_preSD_JK, file = "Jackknife/EMA_5.5_Window_RCI_ind_preSD_JK_k20_n100.RData")
###### EMA_5.5_Days
n = 5
RCI_ind_preSD = function(x, ID_df) {(mean(ID_df[x,2]) - mean(ID_df[x,1])) /
sqrt(2 * (sd(ID_df[x,1]) * sqrt(1 - EMA_5.5_Alpha))^2)}
for (i in 1:nrow(EMA_5.5_Days)) {
df = data.frame(PRE = as.numeric(EMA_5.5_Days[i,pre_5mzp]), POST = as.numeric(EMA_5.5_Days[i,post_5mzp]))
EMA_5.5_Days[i,"RCI_ind_preSD_jse"] = jackknife(1:n, RCI_ind_preSD, df)$jack.se
EMA_5.5_Days[i,"RCI_ind_preSD_jbias"] = jackknife(1:n, RCI_ind_preSD, df)$jack.bias
message(i)
}
EMA_5.5_Days_RCI_ind_preSD_JK = EMA_5.5_Days %>%
select(ID, RCI_ind_preSD_jse, RCI_ind_preSD_jbias)
save(EMA_5.5_Days_RCI_ind_preSD_JK, file = "Jackknife/EMA_5.5_Days_RCI_ind_preSD_JK_k20_n100.RData")load("Jackknife/EMA_30.30_RCI_ind_preSD_JK_k20_n100.RData")
load("Jackknife/EMA_5.5_Window_RCI_ind_preSD_JK_k20_n100.RData")
load("Jackknife/EMA_5.5_Days_RCI_ind_preSD_JK_k20_n100.RData")
EMA_30.30 = full_join(EMA_30.30, EMA_30.30_RCI_ind_preSD_JK, by = "ID")
EMA_5.5_Window = full_join(EMA_5.5_Window, EMA_5.5_Window_RCI_ind_preSD_JK, by = "ID")
EMA_5.5_Days = full_join(EMA_5.5_Days, EMA_5.5_Days_RCI_ind_preSD_JK, by = "ID")
temp = tibble(Jackknife_SE = c(EMA_30.30$RCI_ind_preSD_jse, EMA_5.5_Window$RCI_ind_preSD_jse, EMA_5.5_Days$RCI_ind_preSD_jse),
Datasets = rep(c("EMA_30.30", "EMA_5.5_Window", "EMA_5.5_Days"), each = length(EMA_30.30$RCI_ind_preSD_jse)))
temp %>%
ggplot(aes(x = Jackknife_SE, fill = Datasets)) +
geom_histogram(alpha = 0.2, binwidth = 1, position = "identity") +
labs(x = "Jackknife SE of RCI(ind) With Pre-SDs", y = "Cases")#ggplot(temp, aes(x = Datasets, y = Jackknife_SE)) +
# geom_boxplot(na.rm = TRUE) +
# ggtitle("Jackknife SEs") +
# xlab("Dataset")
temp = tibble(Jackknife_Bias = c(EMA_30.30$RCI_ind_preSD_jbias, EMA_5.5_Window$RCI_ind_preSD_jbias,
EMA_5.5_Days$RCI_ind_preSD_jbias),
Datasets = rep(c("EMA_30.30", "EMA_5.5_Window", "EMA_5.5_Days"), each = length(EMA_30.30$RCI_ind_preSD_jbias)))
temp %>%
ggplot(aes(x = Jackknife_Bias, fill = Datasets)) +
geom_histogram(alpha = 0.2, binwidth = 1, position = "identity") +
labs(x = "Jackknife Bias of RCI(ind) With Pre-SDs", y = "Cases")#ggplot(temp, aes(x = Datasets, y = Jackknife_Bias)) +
# geom_boxplot(na.rm = TRUE) +
# ggtitle("Jackknife Biases") +
# xlab("Dataset")RCI(ind) mit pooled SDs aus beiden individuellen Intervallen
###### EMA_30.30
n = 30
RCI_ind_pooledSD = function(x, ID_df) {(mean(ID_df[x,2]) - mean(ID_df[x,1])) /
sqrt((sd(ID_df[x,1])^ 2 + sd(ID_df[x,2])^ 2) * (1 - EMA_5.5_Alpha))}
for (i in 1:nrow(EMA_30.30)) {
df = data.frame(PRE = as.numeric(EMA_30.30[i,pre_30mzp]), POST = as.numeric(EMA_30.30[i,post_30mzp]))
EMA_30.30[i,"RCI_ind_pooledSD_jse"] = jackknife(1:n, RCI_ind_pooledSD, df)$jack.se
EMA_30.30[i,"RCI_ind_pooledSD_jbias"] = jackknife(1:n, RCI_ind_pooledSD, df)$jack.bias
message(i)
}
EMA_30.30_RCI_ind_pooledSD_JK = EMA_30.30 %>%
select(ID, RCI_ind_pooledSD_jse, RCI_ind_pooledSD_jbias)
save(EMA_30.30_RCI_ind_pooledSD_JK, file = "Jackknife/EMA_30.30_RCI_ind_pooledSD_JK_k20_n100.RData")
###### EMA_5.5_Window
n = 5
RCI_ind_pooledSD = function(x, ID_df) {(mean(ID_df[x,2]) - mean(ID_df[x,1])) /
sqrt((sd(ID_df[x,1])^ 2 + sd(ID_df[x,2])^ 2) * (1 - EMA_5.5_Alpha))}
for (i in 1:nrow(EMA_5.5_Window)) {
df = data.frame(PRE = as.numeric(EMA_5.5_Window[i,pre_5mzp]), POST = as.numeric(EMA_5.5_Window[i,post_5mzp]))
EMA_5.5_Window[i,"RCI_ind_pooledSD_jse"] = jackknife(1:n, RCI_ind_pooledSD, df)$jack.se
EMA_5.5_Window[i,"RCI_ind_pooledSD_jbias"] = jackknife(1:n, RCI_ind_pooledSD, df)$jack.bias
message(i)
}
EMA_5.5_Window_RCI_ind_pooledSD_JK = EMA_5.5_Window %>%
select(ID, RCI_ind_pooledSD_jse, RCI_ind_pooledSD_jbias)
save(EMA_5.5_Window_RCI_ind_pooledSD_JK, file = "Jackknife/EMA_5.5_Window_RCI_ind_pooledSD_JK_k20_n100.RData")
###### EMA_5.5_Days
n = 5
RCI_ind_pooledSD = function(x, ID_df) {(mean(ID_df[x,2]) - mean(ID_df[x,1])) /
sqrt((sd(ID_df[x,1])^ 2 + sd(ID_df[x,2])^ 2) * (1 - EMA_5.5_Alpha))}
for (i in 1:nrow(EMA_5.5_Days)) {
df = data.frame(PRE = as.numeric(EMA_5.5_Days[i,pre_5mzp]), POST = as.numeric(EMA_5.5_Days[i,post_5mzp]))
EMA_5.5_Days[i,"RCI_ind_pooledSD_jse"] = jackknife(1:n, RCI_ind_pooledSD, df)$jack.se
EMA_5.5_Days[i,"RCI_ind_pooledSD_jbias"] = jackknife(1:n, RCI_ind_pooledSD, df)$jack.bias
message(i)
}
EMA_5.5_Days_RCI_ind_pooledSD_JK = EMA_5.5_Days %>%
select(ID, RCI_ind_pooledSD_jse, RCI_ind_pooledSD_jbias)
save(EMA_5.5_Days_RCI_ind_pooledSD_JK, file = "Jackknife/EMA_5.5_Days_RCI_ind_pooledSD_JK_k20_n100.RData")load("Jackknife/EMA_30.30_RCI_ind_pooledSD_JK_k20_n100.RData")
load("Jackknife/EMA_5.5_Window_RCI_ind_pooledSD_JK_k20_n100.RData")
load("Jackknife/EMA_5.5_Days_RCI_ind_pooledSD_JK_k20_n100.RData")
EMA_30.30 = full_join(EMA_30.30, EMA_30.30_RCI_ind_pooledSD_JK, by = "ID")
EMA_5.5_Window = full_join(EMA_5.5_Window, EMA_5.5_Window_RCI_ind_pooledSD_JK, by = "ID")
EMA_5.5_Days = full_join(EMA_5.5_Days, EMA_5.5_Days_RCI_ind_pooledSD_JK, by = "ID")
temp = tibble(Jackknife_SE = c(EMA_30.30$RCI_ind_pooledSD_jse, EMA_5.5_Window$RCI_ind_pooledSD_jse,
EMA_5.5_Days$RCI_ind_pooledSD_jse),
Datasets = rep(c("EMA_30.30", "EMA_5.5_Window", "EMA_5.5_Days"), each = length(EMA_30.30$RCI_ind_pooledSD_jse)))
temp %>%
ggplot(aes(x = Jackknife_SE, fill = Datasets)) +
geom_histogram(alpha = 0.2, binwidth = 1, position = "identity") +
labs(x = "Jackknife SE of RCI(ind) With Pooled SDs", y = "Cases")#ggplot(temp, aes(x = Datasets, y = Jackknife_SE)) +
# geom_boxplot(na.rm = TRUE) +
# ggtitle("Jackknife SEs") +
# xlab("Dataset")
temp = tibble(Jackknife_Bias = c(EMA_30.30$RCI_ind_pooledSD_jbias, EMA_5.5_Window$RCI_ind_pooledSD_jbias,
EMA_5.5_Days$RCI_ind_pooledSD_jbias),
Datasets = rep(c("EMA_30.30", "EMA_5.5_Window", "EMA_5.5_Days"), each = length(EMA_30.30$RCI_ind_pooledSD_jbias)))
temp %>%
ggplot(aes(x = Jackknife_Bias, fill = Datasets)) +
geom_histogram(alpha = 0.2, binwidth = 1, position = "identity") +
labs(x = "Jackknife Bias of RCI(ind) With Pooled SDs", y = "Cases")#ggplot(temp, aes(x = Datasets, y = Jackknife_Bias)) +
# geom_boxplot(na.rm = TRUE) +
# ggtitle("Jackknife Biases") +
# xlab("Dataset")